Skip to main content

Questions tagged [gradle-plugin]

Gradle is a project build automation tool. A Gradle plugin packages up reusable pieces of build logic, which can be used across many different projects and builds. Gradle allows you to implement your own custom plugins, so you can reuse your build logic, and share it with others.

gradle-plugin
Filter by
Sorted by
Tagged with
1293 votes
12 answers
536k views

What's the difference between implementation, api and compile in Gradle?

After updating to Android Studio 3.0 and creating a new project, I noticed that in build.gradle there is a new way to add new dependencies instead of compile there is implementation and instead of ...
humazed's user avatar
  • 76.2k
416 votes
7 answers
144k views

What the difference in applying gradle plugin

I don't understand gradle plugins block apply plugin: 'someplugin1' apply plugin: 'maven' and other one: plugins { id 'org.hidetake.ssh' version '1.1.2' } In first block We have some plugin ...
Yevgen Kulik's user avatar
  • 5,973
241 votes
35 answers
400k views

Android Material and appcompat Manifest merger failed

I have next grade dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0-rc01' implementation 'com.android....
Евгений Усов's user avatar
132 votes
13 answers
89k views

org.gradle.api.InvalidUserCodeException: Querying the mapped value of provider (java.util.Set) before task ... has completed is not supported

I upgraded my project to Android Studio Arctic Fox, so I have to upgrade gradle to 7.0.2 and gradle build tool to 7.0.0-beta04. After synchronizing, I got this warning message in Sync tab: org.gradle....
user avatar
125 votes
8 answers
203k views

cvc-complex-type.2.4.a: Invalid content was found starting with element 'base-extension'. One of '{layoutlib}' is expected

I am facing this issue many times when i download project from github i am using new Android studio(bumble bee) please help me if any body knows https://github.com/fjbatresv/arcore_solar_system.git (...
Anil Dhiman's user avatar
  • 1,409
113 votes
41 answers
218k views

Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

I am getting this kind of error, how to fix it. Error:Unable to load class 'org.gradle.tooling.internal.protocol.test.InternalTestExecutionConnection'. Possible causes for this unexpected error ...
Vatsal Harde's user avatar
  • 1,548
89 votes
8 answers
80k views

How do I create an executable fat JAR with Gradle with implementation dependencies?

I've got a simple project in Gradle 4.6 and would like to make an executable JAR of it. I've tried shadow, gradle-fatjar-plugin, gradle-one-jar, spring-boot-gradle-plugin plugins but neither of them ...
Dmitry Senkovich's user avatar
85 votes
7 answers
72k views

Not able to copy configurations dependencies after upgrading Gradle plugin for Android Studio to 3.0.1 and Gradle to 4.1

I used to copy 'compile' dependencies to a specific folder using this simple gradle task : task copyLibs(type: Copy) { from configurations.compile into "$project.rootDir/reports/libs/" } But ...
Rafael's user avatar
  • 1,604
81 votes
14 answers
168k views

Update Gradle in Flutter project

I have this project in Flutter, but I haven't been able to build an apk for a couple of weeks, because of the Gradle version. I've tried everything, but Flutter always returns the error below: I ...
Israeldev's user avatar
  • 915
80 votes
8 answers
71k views

Gradle version 1.10 is required. Current version is 2.0

I am trying to use latest Gradle version (2.0), however I keep getting this message when hitting gradle build in terminal. Why is it asking for 1.10 version? I am new to Gradle, so I'm trying to get ...
Nabdreas's user avatar
  • 3,477
62 votes
4 answers
64k views

How can the gradle plugin repository be changed?

I work at a big company with a strict policy forbidding the unfiltered use of outside libraries. We have to pull everything from blessed corporate repositories, and not the bare internet, including ...
Tony Pierce's user avatar
59 votes
15 answers
190k views

How to fix "plugin was not found in any of the following sources"

I created a Spring MVC project ion Intellij IDEA. When I build my project, following message is displayed, how can I resolve it? Plugin [id: 'org.springframework.boot', version: '2.1.7.RELEASE'] was ...
steven nguyen's user avatar
46 votes
2 answers
36k views

Difference apply from vs apply plugin

Is there a difference except that: apply from: - gets the (plugin).gradle from a URL apply plugin: - gets the (plugin).gradle from the gradle plugin server
Ari's user avatar
  • 1,471
42 votes
12 answers
42k views

Android-studio 3.4.0-3.4.2 Gradle ERROR: No value has been specified for property 'manifestOutputDirectory'

when upgrading to android-studio 3.4.x/gradle build plugin 3.4.x /gradle 5.3 ... wondering if its an issue with the android plugin. ERROR: No value has been specified for property '...
Bingerz's user avatar
  • 1,037
40 votes
13 answers
69k views

build failing during merge resources with Android Gradle plugin 3.3.0

I have a lot of different flavors for my build that have specific resources and I don't want to clutter my src directory in my project with a bunch of flavor-specific directories, so I add the source ...
akong9759's user avatar
  • 413
40 votes
6 answers
23k views

configuration-cache enabled causes build to fail

I've just upgraded our project to use gradles build and configuration caches to help build speeds. But when running this command the build fails gradlew dependencies --stacktrace --scan I have this ...
Brandon's user avatar
  • 1,358
38 votes
4 answers
17k views

difference between android gradle plugin and gradle

Android Studio 3.2 Canary 5 Build #AI-173.4630681, built on March 3, 2018 JRE: 1.8.0_152-release-1136-b01 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.15.4-300.fc27.x86_64 I have ...
ant2009's user avatar
  • 23.8k
38 votes
2 answers
16k views

Gradle7 Version Catalog: How to use it with buildSrc?

I am very excited about the incubating Gradle's version catalogs and have been experimenting with it. I’ve found that the information in my gradle/libs.versions.toml is accessible in the build.gradle....
A Bit of Help's user avatar
31 votes
20 answers
95k views

Gradle threw an error while downloading artifacts from the network .. Exception: Gradle task assembleDebug failed with exit code 1

I just started with app development with flutter, but am not even able to run the test app. This is what come on console : Launching lib/main.dart on AOSP on IA Emulator in debug mode... Running ...
Ashish Sharma's user avatar
30 votes
2 answers
14k views

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

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 ...
Tony Green's user avatar
30 votes
2 answers
9k views

Android multi module test dependency

With Android Studio 3.0 / android_gradle_version = '3.0.1' / gradle-4.5 Let's say I have two android modules module-base module-a When I want to access sources from module-base in module-a , I just ...
kotoMJ's user avatar
  • 803
27 votes
4 answers
16k views

Android Studio 3.1 : Could not find org.jetbrains.trove4j:trove4j:20160824

Yesterday, I updated Android Studio to 3.1 and I'm getting this error : Could not find org.jetbrains.trove4j:trove4j:20160824. Searched in the following locations: https://repo.maven.apache.org/...
Fadwa Bechri's user avatar
27 votes
4 answers
48k views

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

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 ...
vittochan's user avatar
  • 655
26 votes
5 answers
14k views

Upgrading Gradle from 7.4.2 to Gradle 8.0.0 gives error on release app - java.lang.ClassCastException

I have recently upgraded Android Studio to Flamingo and also upgraded Gradle from 7.4.2 to 8.0.0. All things working fine in version 7.4.2. When I generate a signed APK using Gradle 8.0.0, it's giving ...
Chirag Thummar's user avatar
25 votes
2 answers
17k views

Gradle > How to stop a Spring Boot application launched with gradle bootRun?

I started a spring boot application using gradle bootRun. Doing ctrl-c in the terminal where I launched the command does not stop the application. What is then the correct way of stopping it?
Abbadon's user avatar
  • 2,633
24 votes
2 answers
25k views

List Gradle dependencies for all subprojects

I can query the dependency tree for a Gradle project with ./gradlew -q dependencies. I can also run the query for the service subproject with ./gradlew service:dependencies. How can I list the ...
erdos's user avatar
  • 3,377
22 votes
2 answers
11k views

Kotlin Test Coverage

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.
cjxh's user avatar
  • 303
21 votes
1 answer
11k views

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

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 ...
Arunabh Das's user avatar
  • 14.1k
20 votes
5 answers
43k views

Spring Boot plugin requires Gradle 4.10 or later. The current version is Gradle 4.1

I have a Spring Gradle project. I'm trying to make a build using gradle build command. But getting below error : * Where: Build file 'F:\MyProjectName\build.gradle' line: 2 * What went wrong: An ...
Victory's user avatar
  • 1,242
19 votes
11 answers
43k views

Original kapt is deprecated

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: ...
Bhuvanesh BS's user avatar
  • 13.5k
19 votes
5 answers
10k views

Android/Gradle: conditionally apply plugin based on build type

I would like to make something like (pseudo code): if (BuildType == "release"){ apply plugin: 'testfairy' } else if (BuildType == "debug"){ apply plugin: 'io.fabric' } The idea is that based ...
JoseF's user avatar
  • 1,291
19 votes
3 answers
7k views

Android plugin is too old (2.4.0-alpha7)

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. ...
Hossein Shahdoost's user avatar
19 votes
1 answer
4k views

Disable Google Services Gradle plugin for specific flavour

The usage of Google Services requires the use of this Gradle plugin: apply plugin: 'com.google.gms.google-services' This thread on the Gradle forum has lead me to conclude that you can't selectively ...
southrop's user avatar
  • 879
17 votes
5 answers
22k views

Android Studio plugin is too old

I was syncing fine and then suddenly when I tried to run a test on a device from Android Studio I started getting the error: Error:(1, 0) Plugin is too old, please update to a more recent version, ...
yoyoma's user avatar
  • 3,456
17 votes
6 answers
6k views

Can i disable Firebase plugin for specific flavor?

I'm currently trying out the Firebase analytics suit, but, i have faced one small issue, my app is distributed on both google play and amazon store (which doesn't support google play services), so for ...
Jorge Aguilar's user avatar
16 votes
11 answers
58k views

Some file crunching failed, see logs for details

Today I got update for android studio 2.0 in stable version. I update it and it restarted. Then when It opens my existing project, it ask me to update my gradle plugin to 2.0 to get advantages of "...
Jayesh's user avatar
  • 3,781
16 votes
5 answers
51k views

Gradle Enterprise Gradle plugin (com.gradle.enterprise) not found error in jenkins when trying to build my project

Iam using the Gradle 6.5 version installed on my linux server.I have configured Gradle in jenkins which resides on the same server. I have set a Freestyle project job on jenkins to build using gradle....
sridevi's user avatar
  • 161
16 votes
3 answers
26k views

How to fix 'Could not write standard input to Gradle Test Executor 1' error in Java

I'm trying to compline my code(on new branch) but I got the error after I fix and updated build.gradle but before I run that code my code(on old branches) is still working. So I checkout master ...
Phong Nguyễn Nhật's user avatar
15 votes
2 answers
20k views

How to update Gradle plugin in Android Studio

Inside Android Studio I'm getting the error: Generating signed Bundle requires you to update the Android Gradle plugin to version 3.2.0 or higher If I click "Close this dialog and update the plugin" ...
Rich's user avatar
  • 1,021
15 votes
1 answer
4k views

Create custom Build init type - for Gradle Build Init Plugin?

I'm fairly new to gradle and I would like to create a custom type for with the Gradle Init Plugin. Moreover, I'd like to be able to do something like: gradle init --type jsp-library This would ...
coderrick's user avatar
  • 1,011
14 votes
2 answers
7k views

Checkstyles + Gradle throwing Caused by: java.lang.IllegalArgumentException: given name COMPACT_CTOR_DEF

I've recently added the checkstyle plugin to the project for static code analysis. But after updating the google-style.xml from the latest master, I've started receiving the below exception : org....
Techrookie89's user avatar
14 votes
1 answer
18k views

WARNING: API 'variant.getMergeAssets()' is obsolete / Android Studio 3.3

After the recent android update, each time I build my app, I receive the following warnings: WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant....
Crypticsy's user avatar
  • 780
14 votes
2 answers
17k views

Gradle Spring Boot Devtools: developmentOnly and runtimeClasspath

I am puzzled by this block of code to be used in a gradle file, suggested by Spring Boot Documentation on Developer Tools configurations { developmentOnly runtimeClasspath { ...
leeyuiwah's user avatar
  • 6,942
13 votes
6 answers
7k views

While Android Studio Updated to v3.3 getting API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'

Getting this Warning (Even when variant.getAssemble() is not used anywhere): API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'. I have updated ...
Er. Kaushik Kajavadara's user avatar
13 votes
1 answer
8k views

How to setup a Gradle plugin project in IntelliJ?

I want to create a standalone Gradle plugin project as described in the Gradle documentation. I would like to use IntelliJ with code completion for Groovy and Gradle. Since there is no specialized ...
JJD's user avatar
  • 51.2k
13 votes
2 answers
2k views

How to test afterEvaluate when writing Gradle plugin

I am writing a custom Gradle plugin. I am writing tests for every feature that I want to create in the plugin. I am using java to write the plugin. I create my tasks in the apply method inherited ...
Boris van Katwijk's user avatar
13 votes
2 answers
8k views

Kotlin Multiplatform : Plugin [id: 'com.android.library'] was not found

I am trying to set up Android Library via Kotlin Multiplatform Library. I am getting error: Plugin [id: 'com.android.library'] was not found in any of the following sources: Please help me by ...
Alex's user avatar
  • 498
13 votes
3 answers
2k views

Define buildConfigField for androidTest

I'm defining a particular field in the BuildConfig for getting the URL during runtime. So, for each build type, I use a different string: prod { buildConfigField "String", "BASE_URL", "\"...
Rajath's user avatar
  • 11.9k
12 votes
3 answers
15k views

No signature of method: com.crashlytics.tools.gradle.CrashlyticsPlugin On Mac [closed]

Below error while gradle sync Failed in Mac. CONFIGURE FAILED in 3s ERROR: No signature of method: com.crashlytics.tools.gradle.CrashlyticsPlugin.findObfuscationTransformTask() is applicable for ...
Umesh Suryawanshi's user avatar
12 votes
5 answers
5k views

plugin-under-test-metadata.properties not created by Gradle TestKit when running tests in IDEA

I am using Gradle 3.3 and trying to test a custom plugin with JUnit and Gradle TestKit. In plugin's build.gradle I have version '0.1' apply plugin: 'groovy' apply plugin: 'java-gradle-plugin' ...
Alexey Romanov's user avatar

1
2 3 4 5
33