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
54
votes
1 answer

Android Studio: "Use default gradle wrapper" vs. "Use customizable gradle wrapper"

What exactly is the difference between Android Studio's Gradle options: Android Studio->Preferences->Gradle Use default gradle wrapper (recommended) and Use customizable gradle wrapper? Background: I am working on an Android project in Android…
ZenBalance
  • 10,087
  • 14
  • 44
  • 44
51
votes
5 answers

Docker cache gradle dependencies

I'm trying to deploy our java web application to aws elastic beanstalk using docker, the idea is to be able to run the container locally for development and testing and eventually push it up to production using git. I've created a base image that…
martin treurnicht
  • 1,223
  • 1
  • 10
  • 17
47
votes
5 answers

Run application via gradlew with -Xmx and -Xms

I have an application. I run it via gradlew run-app Or debug gradlew debug-app It works. How do I pass '-Xmx' argument into the application which I run (debug)? Is it possible to do so without edditing build.gradle file? I found this Gradle…
Yan Khonski
  • 12,225
  • 15
  • 76
  • 114
47
votes
3 answers

Should I .gitignore my gradlew?

My gradle project includes gradlew and gradlew.bat files inside of the repository, should they be pushed to git or not? I did not see anybody say they should be removed here. What is the purpose of these files?
Clay
  • 715
  • 1
  • 8
  • 12
43
votes
7 answers

gradlew is not found (No such file or directory)

I load a project from git and build it successfully on MacBook. When I type './gradlew assembleRelease' in terminal window, I get an error: bash: ./gradlew: No such file or directory So I check if gradlew is under the project dir, but I can not…
huyn
  • 451
  • 1
  • 4
  • 7
36
votes
3 answers

Android Studio Build/Clean

In an attempt to compile external jars, I have to use the terminal and do a clean. However, when I go into the root directory of my project and execute gradlew clean I get the following message: -bash: gradlew: command not found Here's a…
Kgrover
  • 2,106
  • 2
  • 36
  • 54
33
votes
1 answer

JVM space exhausted when building a project through gradle

Receiving error message when building a project through gradle Expiring Daemon because JVM Tenured space is exhausted
Rob Blinsinger
  • 1,091
  • 1
  • 7
  • 7
33
votes
6 answers

@Generated annotation using gradlew + dagger

I'm confronting a weird issue using gradlew(4.10.2) + dagger(2.18). The problem is when I call: ./gradlew :app:compileDebugAndroidTestKotlin The build fails with: Task :Common:compileDebugJavaWithJavac…
crgarridos
  • 8,758
  • 3
  • 49
  • 61
32
votes
6 answers

React Native Unable to find a matching configuration of project (Build only)

My react native build works fine when running react-native run-android or cd android && ./gradlew assembleDebug. But I'll get the following for all every react native package I have installed when running ./gradlew assembleRelease > Could not…
jaxoncreed
  • 1,069
  • 2
  • 13
  • 24
31
votes
8 answers

gradlew.bat (and gradlew) SSLHandShakeException

I'm new to Gradle and was going through this Spring Tutorial found here: http://spring.io/guides/gs/gradle/ I get to the part where it tells me to add this task: task wrapper(type: Wrapper) { gradleVersion = '2.3' } I run gradle wrapper which…
MrRoboto
  • 825
  • 3
  • 11
  • 14
29
votes
6 answers

Gradle Could not find tools.jar

I am trying to make a game with LibGdx. I love it! It is sooo simple and a lot better than JME3 and LWJGL. But trying to package it I am having an error. Here is an image of the gui for Gradle: http://prntscr.com/845kyx and here is a the full debug…
Fishy
  • 1,275
  • 1
  • 12
  • 26
28
votes
4 answers

Why the gradle war task is skipped?

I am a new convert to Gradle. Most of the tasks work fine. However, I see that the war task is always skipped. When I run in the debug mode, I see the following logs - 09:12:34.889 [LIFECYCLE]…
user3276247
  • 1,046
  • 2
  • 9
  • 24
27
votes
6 answers

Gradle build-info.xml not found for module app in Android Studio

Gradle build-info.xml not found for module app. Please make sure that you are using gradle plugin gradle:2.0.0-alpha or greater I'm using the gradle plug in gradle:2.0.0-beta2. I randomly get this warning and after this very often either the app…
kingston
  • 11,053
  • 14
  • 62
  • 116
27
votes
4 answers

Gradle wrapper NoClassDefFoundError

When I run ./gradlew I get Exception in thread "main" java.lang.NoClassDefFoundError: org/gradle/wrapper/GradleWrapperMain Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain at…
Gal Bracha
  • 19,004
  • 11
  • 72
  • 86
27
votes
3 answers

Difference between running lint via Android Studio menu and gradlew command-line

When I run the following on a command line: ./gradlew -lint I get different results than if I choose the following menu option within Android Studio. Analyze->Inspect Code... Can anyone explain this? Is this normal? Should a prudent developer…
gonzobrains
  • 7,856
  • 14
  • 81
  • 132
1
2
3
80 81