What is Gradle wrapper?
The Gradle wrapper allows you to run a Gradle task without requiring that Gradle is installed on your system.
1. Create a Gradle Wrapper
1.1 Declares a wrapper task.
build.gradle
task wrapper(type: Wrapper) {
gradleVersion = '2.10' //we want gradle 2.10 to run this project
}
Copy
1.2 Run the wrapper task with gradle wrapper
$ gradle wrapper
:wrapper
BUILD SUCCESSFUL
Copy
1.3 The following files will be created, remember to add these files and folders to your version control system (e.g GitHub or Bitbucket).
|-gradle
|--- wrapper
|--- gradle-wrapper.jar
|--- gradle-wrapper.properties
|-gradlew
|-gradlew.bat
No comments:
Post a Comment