123456789101112131415161718192021222324252627282930313233343536373839 |
- 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) {
- def template = new File(projectDir, 'template.mf')
- def bundlorDir = new File("${project.buildDir}/bundlor")
- def manifest = file("${bundlorDir}/META-INF/MANIFEST.MF")
- outputs.dir bundlorDir
- outputs.files manifest
- inputs.files template, project.sourceSets.main.runtimeClasspath
- jar.manifest.from manifest
- jar.inputs.files manifest
- doFirst {
- ant.taskdef(resource: 'com/springsource/bundlor/ant/antlib.xml', classpath: configurations.bundlor.asPath)
- logging.captureStandardOutput(LogLevel.INFO)
- mkdir(bundlorDir)
- ant.bundlor(inputPath: sourceSets.main.classesDir, outputPath: "$buildDir/bundlor", manifestTemplatePath: template) {
- for (p in bundlorProperties) {
- property(name: p.key, value: p.value)
- }
- }
- }
- }
- jar.dependsOn bundlor
|