環境
OS X Yosemite 10.10.3
jdk1.8.0_45.jdk
Spring Tool Suite
Version: 3.6.4.RELEASE
Build Id: 201503100337
Platform: Eclipse Kepler SR2 (4.3.2)
Gradle IDE plugin Version: 3.6.4.201503050952-RELEASE
Gradle Project新規作成手順
File -> New -> Project...
Gradle -> Gradle Project
Project Name: GP
Sample Project: Java Quickstart
Press Finish button
作成されたbuild.gradle
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = 1.5
version = '1.0'
jar {
manifest {
attributes 'Implementation-Title': 'Gradle Quickstart',
'Implementation-Version': version
}
}
repositories {
mavenCentral()
}
dependencies {
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
testCompile group: 'junit', name: 'junit', version: '4.+'
}
test {
systemProperties 'property': 'value'
}
uploadArchives {
repositories {
flatDir {
dirs 'repos'
}
}
}
参考
-
Gradle User Guide、第7章 Javaクイックスタート
http://gradle.monochromeroad.com/docs/userguide/tutorial_java_projects.html -
Source
https://github.com/quwahara/GP/tree/20150607-1-first-commit
次の記事
Spring IO,Spring Boot, Eclipse Gradle ProjectでHello world
http://qiita.com/quwahara/items/2f2c68dd24696eb28588