build.gradle

How can I run kotlintest tests with gradle?

感情迁移 提交于 2019-12-05 06:34:24
The kotlintest tests run perfectly fine when started from Intellij, but when I try to run them with the gradle test task command, only my regular JUnit tests are found and run. The kotlintest code: import io.kotlintest.matchers.shouldBe import io.kotlintest.specs.StringSpec class HelloKotlinTest : StringSpec() { init { println("Start Kotlin UnitTest") "length should return size of string" { "hello".length shouldBe 5 } } } build.gradle: apply plugin: 'org.junit.platform.gradle.plugin' buildscript { ext.kotlinVersion = '1.1.3' ext.junitPlatformVersion = '1.0.0-M4' repositories { maven { url

gradle finished with non-zero exit value 3

我的未来我决定 提交于 2019-12-05 06:31:13
My project contains 3 libraries: calendar_cmcc , Wheel_library and yellowPage_lib . I can build the project perfectly, but gradle throws an error when I run it.Here is the error: Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/jim/tools/jdk1.8.0_45/bin/java'' finished with non-zero exit value 3 gradle file list: app's build.gradle: apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion '21.1.2' defaultConfig { applicationId "cn.com.geartech.app"

error while generating signed apk task app:packageRelease

落花浮王杯 提交于 2019-12-05 06:07:34
Error:A problem was found with the configuration of task ':app:packageRelease'. File '/Volumes/Data/Android apps/NammaKarnataka-master/app/build/intermediates/res/resources-release-stripped.ap_' specified for property 'resourceFile' does not exist. The following error message occurred while I tried to generate signed apk on Android studio 2.2. What additional information is required in order to solve this issue? Add shrinkResources , set to false , to the release clause: buildTypes { release { signingConfig signingConfigs.release minifyEnabled false shrinkResources false //ADD THIS

change file permission by gradle

安稳与你 提交于 2019-12-05 06:03:19
I create .jar file and move it to dir, but I don't understand how I can change permission for this file after. task fatJar(type: Jar) { manifest { attributes 'Implementation-Title': 'Gradle Jar File Example', 'Implementation-Version': version, 'Main-Class':'com.asd.App', 'Class-Path': 'com.asd' } baseName = project.name + '-all' from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } def file = file('/home/master/project/asd') fileMode = 755 destinationDir = file with jar } Ayon Nahiyan Create an Exec Task to change file permission. Add this in your build.gradle file

Gradle doesn't emit kotlin.js

爷,独闯天下 提交于 2019-12-05 05:59:30
I'm trying to compile my Kotlin app and set of Kotlin libraries to JavaScript. I've got that working well, but when I try to run it it can't find kotlin.js . So what's going on here? When I compile using IDEA (instead of Gradle), it outputs kotlin.js just fine. I tried making my build script more like an example I found, but that wouldn't compile ... Here's a link to the code and project in question: https://github.com/BlueHuskyStudios/Decision-Cruncher/blob/SO/q/53582651/1/build.gradle For any others struggling in the future, I've had the following issue: IntelliJ Kotlin/JS starter project

Error Annotation Processors must be explicitly declared now

最后都变了- 提交于 2019-12-05 05:56:35
Suddenly i got an error in the execution of the app. I know that this qustion was already asked here: Annotation processors must be explicitly declared now However the solution don't answer the problem :( this is my build.gradle apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { compileSdkVersion 26 buildToolsVersion '27.0.0' aaptOptions { cruncherEnabled = true } defaultConfig { applicationId "com.freelance.crdzbird_dev.clarobadge" minSdkVersion 19 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner

Gradle Error in Android Studio: Plugin with id 'com.android.library' not found

三世轮回 提交于 2019-12-05 05:28:39
When I am trying to Build an Android Library Project in Android Studio, I am getting the following Gradle error: Gradle sync failed: Plugin with id 'com.android.library' not found. I am pretty new to Gradle and this is very confusing for me. Why is this happening? The build.gradle file is as follows: apply plugin: 'com.android.library' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { minSdkVersion 8 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard

What is “platformAttrExtractor” in Android Task Execution?

放肆的年华 提交于 2019-12-05 05:25:56
I profile my build follwings instruction in Android: gradlew --profile --recompile-scripts --offline --rerun-tasks assembleFlavorDebug I found "UI:platformAttrExtractor" takes a long time, please see the screenshot. I don't understand what "platformAttrExtractor" is and how can I remove it to save build time? yasyd I have the sample "problem". What I noticed is that by specifying the --offline command line option for gradle, build time (and specifically the time taken by the platformAttrExtractor) task is reduced considerably 来源: https://stackoverflow.com/questions/47660949/what-is

Android Gradle's dependency cache may be corrupt and gradle build not working

泄露秘密 提交于 2019-12-05 05:22:18
I am trying to import this project, even I tried to import other few projects too, I am getting below error. https://github.com/ashdavies/data-binding I have spent my 5 hours on it, even I tried many solutions on google but nothing gonna worked for me. I tried following solutions, nothing worked. 1) delete .gradle directory 2) Restart IDE, 3) I tested with com.android.tools.build:gradle-experimental:0.7.0-alpha1 I am frustrated because of this Gradle and these issues. Gradle Version : Gradle-2.13, I do not want to change this version. Android Studio Version : Stable 2.1.1 Note : My other

Error:Execution failed for task , finished with non-zero exit value 1

不想你离开。 提交于 2019-12-05 05:08:31
Error:Execution failed for task ':onyxenrollwizardsampleapp:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1 Here is my Gradle file. Kindly help me out apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.example.onyx_enroll_wizard_sample_app" minSdkVersion 14 targetSdkVersion 23 } buildTypes { release { minifyEnabled false proguardFiles