java project third party lib 포함해서 빌드하기
이미지 출처: https://medium.com/@101/speed-up-gradle-build-in-android-studio-80a5f74ac9ed#.p3j4dbawk
1. download sample project
참고링크: https://spring.io/guides/gs/gradle/
git clone https://github.com/spring-guides/gs-gradle.git
2. build.gradle 수정 및 build
2.1. /gs-gradle/complete/gradle.build 파일 jar정보 수정
jar {
manifest {
attributes 'Main-Class': 'hello.HelloWorld'
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
baseName = 'gs-gradle'
version = '0.1.0'
}
2.2. /gs-gradle/complete/gradle.build script 실행
C:\temp\spring_cookbook\building_java_project_with_gradle\gs-gradle\complete>gradle build
:compileJava UP-TO-DATE
:processResources NO-SOURCE
:classes UP-TO-DATE
:jar
:startScripts
:distTar
:distZip
:assemble
:compileTestJava UP-TO-DATE
:processTestResources NO-SOURCE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build
BUILD SUCCESSFUL