Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does a gradlew do

I got a project which was a eclipse project. And now I'm using Android Studio with gradle 2.2.1. I've found that when I create a project with Android Studio, it will generate a gradlew file, and it may include some CLI functions. But when I transfer my project from eclipse to Android Studio, I didn't find my gradlew file. So, here is my question: what does a gradlew file exactly do? Can it be customized?

like image 972
Woogux Wu Avatar asked May 07 '15 01:05

Woogux Wu


People also ask

What does gradlew Eclipse do?

with the command gradle eclipse or ./gradlew eclipse you can generate Eclipse project files. After generating the Eclipse project files, you can import the project into a Eclipse workspace.

How do I use gradlew on Windows?

To run a Gradle command, open a command window on the project folder and enter the Gradle command. Gradle commands look like this: On Windows: gradlew <task1> <task2> … ​ e.g. gradlew clean allTests.

Should I commit gradlew file?

From Gradle's documentation: The scripts generated by this task are intended to be committed to your version control system. This task also generates a small gradle-wrapper. jar bootstrap JAR file and properties file which should also be committed to your VCS.


1 Answers

gradlew is for gradle wrapper which can let your project independent with the environment. For example, in CI server, if your project brings gradle wrapper, then you don't have to install gradle in the environment.

If you create a project with android studio, it will generate gradle wrapper into your project by default.

You can see more information in Gradle wrapper

like image 94
Leo Lin Avatar answered Oct 03 '22 08:10

Leo Lin