달력

92021  이전 다음

  •  
  •  
  •  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  •  
  •  

gradle wrapper

java 2013. 10. 19. 23:21

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

Posted by 케누 kenu허광남

댓글을 달아 주세요