|
@@ -1,6 +1,3 @@
|
|
|
-import java.util.jar.Manifest
|
|
|
-import org.gradle.api.tasks.bundling.GradleManifest
|
|
|
-
|
|
|
apply id: 'java'
|
|
|
|
|
|
springVersion = '3.0.1.RELEASE'
|
|
@@ -13,7 +10,6 @@ jettyVersion = '6.1.22'
|
|
|
hsqlVersion = '1.8.0.10'
|
|
|
|
|
|
configurations {
|
|
|
- bundlor
|
|
|
provided
|
|
|
compile.extendsFrom provided
|
|
|
}
|
|
@@ -32,9 +28,6 @@ dependencies {
|
|
|
'org.hamcrest:hamcrest-core:1.1',
|
|
|
'org.hamcrest:hamcrest-library:1.1',
|
|
|
"org.springframework:spring-test:$springVersion"
|
|
|
- bundlor 'com.springsource.bundlor:com.springsource.bundlor.ant:1.0.0.RELEASE',
|
|
|
- 'com.springsource.bundlor:com.springsource.bundlor:1.0.0.RELEASE',
|
|
|
- 'com.springsource.bundlor:com.springsource.bundlor.blint:1.0.0.RELEASE'
|
|
|
}
|
|
|
|
|
|
test {
|
|
@@ -44,23 +37,3 @@ test {
|
|
|
jvmArgs = ['-ea', '-Xms128m', '-Xmx500m', '-XX:MaxPermSize=128m']
|
|
|
}
|
|
|
|
|
|
-task bundlor(dependsOn: compileJava) {
|
|
|
- onlyIf {
|
|
|
- dependsOnTaskDidWork()
|
|
|
- }
|
|
|
- doFirst {
|
|
|
- ant.taskdef(resource: 'com/springsource/bundlor/ant/antlib.xml', classpath: configurations.bundlor.asPath)
|
|
|
- File template = new File(projectDir, 'template.mf')
|
|
|
- mkdir(buildDir, 'bundlor')
|
|
|
- if (template.exists()) {
|
|
|
- ant.bundlor(inputPath: sourceSets.main.classesDir, outputPath: "$buildDir/bundlor", manifestTemplatePath: template) {
|
|
|
- property(name: 'version', value: "$version")
|
|
|
- property(name: 'spring.version', value: "$springVersion")
|
|
|
- }
|
|
|
- // See GRADLE-395 for support for using an existing manifest
|
|
|
- jar.manifest = new GradleManifest(new Manifest(new File("$buildDir/bundlor/META-INF/MANIFEST.MF").newInputStream()))
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-jar.dependsOn bundlor
|