Questions tagged [gradlew]

gradlew is an executable file created by the gradle wrapper plugin, to replace the normal gradle executable for a project

While the normal Gradle executable comes with the installed version and therefor depends on that version, gradlew downloads the correct version of Gradle (specified in the Gradle build script) and thereby ensures that the build is independent of the installed Gradle version.

One obtains a gradlew executable by applying the Gradle wrapper plugin in the build script, specifying a Gradle version and executing

gradle wrapper

After that gradlew can be used whenever one normally would use Gradle.

Official Gradle website: https://gradle.org/

1210 questions
24
votes
13 answers

React Native Generating Signed APK "KeyStore file not set for signing config release"

I am trying to generate a signed APK. I have my password.keystore file located in \Dictionary\android\app and when i ran gradlew assembleRelease on cmd, the error: Execution failed for task ':app:validateSigningRelease'. Keystore file not set for…
23
votes
3 answers

Type 'JavaCompile' property 'options.compilerArgumentProviders.apt$0.name' is missing an input or output annotation. error after upgrading to Gradle 7

After upgrading to Gradle 7.0 and making a build, I'm getting following failure: > Task :compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Some problems were found with the configuration of task ':compileJava' (type…
Clawdidr
  • 577
  • 1
  • 8
  • 25
22
votes
7 answers

Slow gradle build in Docker. Caching gradle build

I am doing university project where we need to run multiple Spring Boot applications at once. I had already configured multi-stage build with gradle docker image and then run app in openjdk:jre image. Here is my Dockerfile: FROM…
PAwel_Z
  • 329
  • 1
  • 2
  • 5
22
votes
3 answers

What is the difference between gradlew build and gradlew assembleRelease

I want to build apk from command line with the help of gradle. Which command should I use to build apks for only release flavours?
Amey Jahagirdar
  • 455
  • 1
  • 4
  • 14
21
votes
2 answers

./gradlew The operation couldn’t be completed. Unable to locate a Java Runtime

When I run ./gradlew from project folder I get: ./gradlew The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java. The same with java: which…
mrgloom
  • 20,061
  • 36
  • 171
  • 301
21
votes
10 answers

Command Failed: gradlew.bat installDebug error whenever installing dependencies like navigation, firebase, icons etc in React-Native

When ever i install any dependency in my react native project and when ever i use link command for e.g react-native link react-native-gesture-handler this causes me an error shown in the image [1]. It doesn't build the project shows the error…
21
votes
13 answers

Exception in thread "main" java.net.UnknownHostException: services.gradle.org

I am getting the below error when executing gradle.bat. I have checked the URL path and it looks fine. The URL is defined like this in the wrapper properties: distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip Here's the…
geetha
  • 217
  • 1
  • 3
  • 9
20
votes
1 answer

How to read a json file into build.gradle and use the values the strings in build.gradle file

for example, read the json file in build.gradle and use the json values as strings in the file { "type":"xyz", "properties": { "foo": { "type": "pqr" }, "bar": { "type": "abc" }, "baz": { "type":…
IMRAN SHAIK
  • 615
  • 2
  • 6
  • 11
19
votes
4 answers

Gradle: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

I saw this gradle error: "Could not initialize class org.codehaus.groovy.runtime.InvokerHelper". I have tried multiple ways listed online to fix the issue but no luck. During the debugging, I found weird JVM version. Installed Java 14 and I have set…
reactnative
  • 505
  • 2
  • 7
  • 14
19
votes
3 answers

Gradle build is hanging without failure, DefaultFileLockManager acquiring and releasing lock on daemon addresses registry

I have several gradle-based projects and on all of them recently I've become unable to execute a ./gradlew clean build. Upon running this, the When I run with the --debug flag, I get stuck on > Building 7% > :compileJava > Resolving dependencies…
Arthur
  • 345
  • 1
  • 2
  • 5
18
votes
2 answers

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 dependencies automatically for all subprojects from the…
erdos
  • 3,135
  • 2
  • 16
  • 27
18
votes
8 answers

org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V'

I'm unable to build the project after updating android studio to 3.4. can anyone please help me. Unable to find method 'org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V'. Possible causes for this unexpected error…
sam
  • 183
  • 1
  • 1
  • 7
18
votes
4 answers

Intellij Idea not showing errors in Message Tool Window after Gradle build

Intellij Idea 14.1.2, Gradle 2.3 I have a project with few java subprojects. Gradle builds works as expected but Intellij Idea does not capture the output of it and does not show the Messages Tool Window where you can click on the error and go to…
Ognyan
  • 13,452
  • 5
  • 64
  • 82
18
votes
4 answers

How to properly write a gradle-wrapper.properties file?

Can anyone please tell me if there is any advantage of gradlew over gradle? Also I have some doubts on the gradle-wrapper.properties file. Initially when I ran C:\project_basedir>gradle wrapper I found the following content in…
sanjeev
  • 458
  • 1
  • 6
  • 15
17
votes
7 answers

java.lang.NoSuchFieldException error from jacoco

I am trying to run the tests of the kotlin code provided from here : https://github.com/ligi/ipfs-api-kotlin with gradlew I got the error listed below. Could someone tell me what this error means ? > Task :test FAILED Exception in thread "main"…
Emile Achadde
  • 1,715
  • 3
  • 10
  • 22
1 2
3
80 81