You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.0 KiB
31 lines
1.0 KiB
apply plugin: 'java' |
|
|
|
configurations { |
|
bundlor |
|
} |
|
|
|
dependencies { |
|
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' |
|
} |
|
|
|
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") |
|
} |
|
jar.manifest.from("$buildDir/bundlor/META-INF/MANIFEST.MF") |
|
} |
|
} |
|
} |
|
|
|
jar.dependsOn bundlor
|
|
|