Files
spring-shell/samples/helloworld/build.gradle
2012-07-16 10:27:36 +08:00

39 lines
1.2 KiB
Groovy

description = 'Spring Shell Example'
apply plugin: 'base'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
repositories {
mavenCentral()
maven { url "http://repo.springsource.org/snapshot" }
maven { url "http://repo.springsource.org/release" }
maven { url "http://repo.springsource.org/milestone" }
maven { url "http://spring-roo-repository.springsource.org/release" }
}
dependencies {
compile "org.springframework.shell:spring-shell:$springShellVersion"
testCompile "junit:junit:$junitVersion"
}
task copyDependency(type: Copy) {
into "$buildDir/libs/dependency"
from configurations.runtime
}
project.ext.springShellJar = configurations.runtime.find { file -> file.name.contains("spring-shell")}
//println("spring shell name is:" + project.ext.springShellJar.name)
project.ext.manifestClasspath = "dependency/" + springShellJar.name + " "
project.ext.manifestClasspath = project.ext.manifestClasspath + configurations.runtime.collect{ File file -> "dependency/"+file.name}.join(' ')
jar {
baseName "helloworld"
manifest {
attributes 'Main-Class' : 'org.springframework.shell.Bootstrap', "Class-Path" : project.ext.manifestClasspath
}
}
defaultTasks 'clean', 'build', 'copyDependency'