gradle-plugin

Kotlin Test Coverage

瘦欲@ 提交于 2019-12-05 00:38:03
Does anyone know if a good test coverage tool (preferably Gradle plugin) exists for Kotlin? I've looked into JaCoCo a bit, but it doesn't seem to reliably support Kotlin. Mikezx6r As requested, here is an example build.gradle that uses Kotlin, and incorporates both Jacoco and Sonarqube integration, produces a jar and sources, and ties in Detekt for static analysis. I had to manually add a couple things as my work build has jacoco applied by an in-house plugin. plugins { id 'org.jetbrains.kotlin.jvm' version '1.2.10' id 'org.jetbrains.kotlin.plugin.spring' version '1.2.10' id 'org

Original kapt is deprecated

微笑、不失礼 提交于 2019-12-05 00:29:32
I have changed Kotlin version to 1.2.30. After the update I unable to run the project. I got the below error message. Error:Execution failed for task ':app:compileDevDebugJavaWithJavac'. > app: Original kapt is deprecated. Please add "apply plugin: 'kotlin-kapt'" to your build.gradle. How do I resolve this? Source : Annotation Processing with Kotlin Source Link 1: https://kotlinlang.org/docs/reference/kapt.html Source Link 2: https://github.com/uber/NullAway/issues/75 Kotlin plugin doesn't pick up annotationProcessor dependencies, So we have to use kapt dependencies with kotlin-kapt . Use the

Cannot get property 'compileSdkVersion' on extra properties extension as it does not exist Open File

时光怂恿深爱的人放手 提交于 2019-12-04 16:59:52
问题 I imported a project downloaded from GitHub into my Android Studio project as module. The "Import module..." wizard worked fine, but when the Adroid Studio tried to rebuild the project, it returned me this error: Cannot get property 'compileSdkVersion' on extra properties extension as it does not exist Open File The error is related to this line in the "build.gradle" file of the imported module: compileSdkVersion rootProject.compileSdkVersion I tried to add "ext" section in the project "build

Unable to overwrite the manifest with gradle plugin 3.3

本小妞迷上赌 提交于 2019-12-04 16:12:33
This is basically a copy of the text that I wrote in this issue Any help would be appreciated: I'm trying to upgrade my project to gradle plugin 3.3 w/ gradle 4.10.1 and my build fails with the following error What went wrong: Execution failed for task ':main:processDebugManifest'. java.io.FileNotFoundException: /main/property(interface org.gradle.api.file.Directory, transform(property(interface org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultProjectLayout$FixedDirectory, /main/build))))/AndroidManifest.xml (No such file or directory) my code is identical to the

Configuring nodeModulesDir in gradle-node-plugin

寵の児 提交于 2019-12-04 13:04:59
I trying to set up caching of npm packages. This is my plugin configuration: node { version = '4.5.0' npmVersion = '3.10.6' distBaseUrl = 'https://nodejs.org/dist' download = true workDir = file("$webAppSourceAbsolute/nodejs") nodeModulesDir = file("$webAppSourceAbsolute/") } And this is my task: task npmCacheConfig(type: NpmTask) { description = "Configure the NPM cache" outputs.upToDateWhen { false } def npmCacheDir = "${gradle.getGradleUserHomeDir()}/caches/npm" outputs.files file(npmCacheDir) args = ['config', 'set', 'cache', npmCacheDir] } But when I run this task, I got an error: :arm

Duplicate Entry for ':app:transformClassesWithJarMergingForDebug'

给你一囗甜甜゛ 提交于 2019-12-04 13:02:50
I am Importing my project from Eclipse , while building an APK i found following Error. Error:Execution failed for task com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/plus/PlusOneButton$OnPlusOneClickListener.class Error:Execution failed for task ':gruhini:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/games/Game.class Error:Execution failed for task ':gruhini:transformClassesWithJarMergingForDebug'. com

How to disable Android NDK build for some build variant

独自空忆成欢 提交于 2019-12-04 11:15:39
I am using Android Studio 2.2 and have setup Gradle to build c/c++ sources with NDK via CMake. Now I would like to disable NDK build for buildType "debug". For buildType "release" I would like to keep it. The goal is to make NDK sources compile on the build server (using "release") but disable it for developers (using "debug"). This is the build.gradle file currently in use: android { externalNativeBuild { cmake { path "CMakeLists.txt" } } defaultConfig { externalNativeBuild { cmake { arguments "-DANDROID_TOOLCHAIN=clang" cppFlags "-std=c++14" } } ndk { abiFilters 'armeabi-v7a', 'x86' } }

Android plugin is too old (2.4.0-alpha7)

为君一笑 提交于 2019-12-04 10:03:20
问题 I'm using android studio 2.4, And getting this error. Apparently I have to update my android plugin, but when I checked jcenter for new versions the only version available was 2.5.0-alpha-preview-02 . which would cause the exact same error. I also see somewhere in the error message that it says I must replace the ANDROID_DAILY_OVERRIDE environment variable. But I really have no idea where to put this environment variable? Should it go to local.properties or is it an OS env variable? I was

Android Studio 2.2 update: aligned APK (zipAlign) not generated using the new Gradle Plugin 2.2.0

拈花ヽ惹草 提交于 2019-12-04 09:19:47
问题 After updating Android Studio to version 2.2 I also got an update for the Gradle Plugin (it was 2.1.3): ... classpath 'com.android.tools.build:gradle:2.2.0' ... I see the unaligned variant APK file but other variants are not generated anymore. I tryed to enable the zip align: buildTypes { release { minifyEnabled false zipAlignEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } debug { applicationIdSuffix '

Gradle sync failed: Failed to update Android plugin to version '2.0.0'

你离开我真会死。 提交于 2019-12-04 06:08:59
I've recently updated Android Studio to 2.0. I am working on a part time course and I have to work on a project provided. When gradle tried to build the project a dialog popped up asking me to update the android studio gradle plugin. When I clicked update, I got an error which is in the title. My gradle files are as follows: Gradle Wrapper: #Wed Sep 30 11:56:02 PDT 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=http\://services.gradle.org/distributions/gradle-2.2-bin.zip Module Gradle: apply plugin: