gradle-plugin

How can I make Gradle extensions lazily evaluate properties that are set dynamically by tasks?

[亡魂溺海] 提交于 2019-12-01 01:32:52
问题 I'm pretty new to working with Gradle and I'm trying to develop a plugin that helps manage version numbering. This plugin defines a task that sets the project.version property of the project it's applied to. What I'm trying to do is make it so that this property is set at the start of every Gradle build. Using Peter's answer to another Gradle question, I've managed to get my task to execute before any other by adding gradle.startParameter.taskNames = [":setProjectVersionNumber"] + gradle

Error :“Configuration 'compile' is obsolete and has been replaced with 'implementation'.”, even though no 'compile' present in gradle

泪湿孤枕 提交于 2019-11-30 23:16:25
问题 I have the following gradle files and I can't find anything which would still warrant the warning " Configuration 'compile' is obsolete and has been replaced with 'implementation' ." First Module Gradle file: buildscript { repositories { maven { url 'https://maven.fabric.io/public' } } dependencies { classpath 'io.fabric.tools:gradle:1.24.1' } } repositories { maven { url 'https://maven.fabric.io/public' } } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin:

Error when compiling with gradle (can't find downloaded dependencies)

对着背影说爱祢 提交于 2019-11-30 15:42:44
I develop an app generation system that is regenerating apps by command line gradle compilation commands. In my windows server 2008, I'm facing a huge problem after updating to the last gradle version and gradle plugin version. When compiling I'm getting this errors: C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar\e93435c34d5cae8b6677dcef529711a5\res\drawable-xxhdpi-v4\abc_text_select_handle_middle_mtrl_light.png: error: file not found. C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar

how to resolve 'unable to find valid certification path to requested target' on Android Studio 2.3.2

不问归期 提交于 2019-11-30 13:41:41
I am getting following error in Android Studio 2.3.2 when i am trying to create Empty Activity project. I also getting this when i try to import a project. Error:Cause: unable to find valid certification path to requested target Here my gradle buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } And apply plugin: 'com.android

How do I know the properties in applicationVariants of android gradle plugin?

醉酒当歌 提交于 2019-11-30 12:04:51
问题 I'm using Android Studio with gradle plugin to develop applications. I learn some usage of android gradle plugin on DSL Reference. But one thing I found is that the applicationVariants part on doc is hard to understand. It only gives such a description: DomainObjectSet<ApplicationVariant> applicationVariants The list of Application variants. Since the collections is built after evaluation, it should be used with Gradle's all iterator to process future items. But what's the properties in the

How do I know the properties in applicationVariants of android gradle plugin?

。_饼干妹妹 提交于 2019-11-30 01:59:24
I'm using Android Studio with gradle plugin to develop applications. I learn some usage of android gradle plugin on DSL Reference . But one thing I found is that the applicationVariants part on doc is hard to understand. It only gives such a description: DomainObjectSet<ApplicationVariant> applicationVariants The list of Application variants. Since the collections is built after evaluation, it should be used with Gradle's all iterator to process future items. But what's the properties in the ApplicationVariant? I don't know. And I found nothing reference link to describe the ApplicationVariant

Gradle sync failed: 'com.android.build.gradle.BasePlugin' does not implement the Plugin interface

大城市里の小女人 提交于 2019-11-30 00:11:55
Environment : Android Studio 2.1 Project : Android SDK + Cordova Android Studio throws the following error during Gradle Sync : Gradle sync failed: 'com.android.build.gradle.BasePlugin' does not implement the Plugin interface Faced the same issue after upgrading to android studio 2.1 from 1.5 Managed to resolve by updating the dependencies version if the gradle.gradleVersion >= 2.1 in the build.gradle file under buildscript {} OLD Configuration if (gradle.gradleVersion >= "2.2") { dependencies { classpath 'com.android.tools.build:gradle:1.5.0' } } else if (gradle.gradleVersion >= "2.1") {

Error when compiling with gradle (can't find downloaded dependencies)

折月煮酒 提交于 2019-11-29 23:06:29
问题 I develop an app generation system that is regenerating apps by command line gradle compilation commands. In my windows server 2008, I'm facing a huge problem after updating to the last gradle version and gradle plugin version. When compiling I'm getting this errors: C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar\e93435c34d5cae8b6677dcef529711a5\res\drawable-xxhdpi-v4\abc_text_select_handle_middle_mtrl_light.png: error: file not found. C

how to prevent jacoco instrumenting production code?

人盡茶涼 提交于 2019-11-29 16:30:10
i use jacoco plugin for gradle: apply plugin: 'kotlin' jacoco { toolVersion = "0.7.9" } jacocoTestReport { reports { xml.enabled true html.enabled false csv.enabled false } } and then i want to build a package for production ./gradlew build jacocoTestReport the question is: will the generated package be instrumented by jacoco? if yes, how can build package NOT instrumented = ready for production? and having code coverage run? do i have to run build twice? is it impossible to build code once (sign it) and then test it, measure coverage etc and if all checks passes, deploy it? JaCoCo provides

Reset default gradle and plugin for android studio to be up to date when creating new projects?

和自甴很熟 提交于 2019-11-29 07:58:24
Is there a way to reset the default gradle and plugin, without resetting all my settings, so I don't keep having these errors when creating new projects? Error: Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to So in the top level build.gradle I update to: dependencies { classpath 'com.android.tools.build:gradle:2.0.0-alpha6' } And then change the gradle to 2.10 as per requirements here. 2.0.0-alpha5 (2016/1/14) // hence alpha6 Needs gradle 2.10 to work Android Studio Template Files located on below path: {android_studio