gradle이 설치되지 않은 경우 실행이 가능하도록 실행스크립트를 더해줍니다. build.gradle 파일에 gradle의 버전을 지정합니다.
task wrapper(type: Wrapper) {
gradleVersion = '1.8'
}
위 내용이 추가되면 gradle wrapper 라는 명령으로 빌드스크립트를 생성합니다. gradlew 파일이 생성됩니다. 윈도우용과 리눅스용이 같이 생깁니다.
gradle wrapper
:wrapper
BUILD SUCCESSFUL
Total time: 4.893 secs
├── gradle
│ └── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── src
└── main
└── java
└── hello
├── Greeter.java
└── HelloWorld.java
만들어진 gradlew 파일을 실행하면 다음과 같습니다.
./gradlew build
Downloading http://services.gradle.org/distributions/gradle-1.8-bin.zip
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /Users/kenu/.gradle/wrapper/dists/gradle-1.8-bin/vruqmccc8532n7gr46qavsii8/gradle-1.8-bin.zip to /Users/kenu/.gradle/wrapper/dists/gradle-1.8-bin/vruqmccc8532n7gr46qavsii8
Set executable permissions for: /Users/kenu/.gradle/wrapper/dists/gradle-1.8-bin/vruqmccc8532n7gr46qavsii8/gradle-1.8/bin/gradle
:compileJava
:processResources UP-TO-DATE
:classes
:jar
:assemble
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build
BUILD SUCCESSFUL
Total time: 20.926 secs
참고: http://spring.io/guides/gs/gradle/#build-your-project-with-gradle-wrapper