Commit 8776cc0d authored by Eric Bruneton's avatar Eric Bruneton

Add a task to generate a sigtest file for the current version.

parent 23337ecf
Pipeline #1445 failed with stage
in 2 minutes and 40 seconds
......@@ -233,16 +233,31 @@ configure(subprojects.findAll { it.provides }) {
File.pathSeparator + sourceSets.main.output.classesDirs.asPath,
'-FileName', f, '-Out', outputs.getFiles()[0], '-Package'
args provides
// The exit value is not 0 in case of success, but 95...
ignoreExitValue true
ignoreExitValue true // The exit value is 95 in case of success...
doLast {
if (!outputs.getFiles()[0].readLines().find {it =~ /STATUS:Passed/}) {
throw new GradleException('Sigtest FAILED')
}
if (!outputs.getFiles()[0].readLines().find {it =~ /STATUS:Passed/})
throw new GradleException()
}
}
check.dependsOn f.name
}
// Define a task to create a sigtest file for the current version.
task "buildSigtest" (type: JavaExec, dependsOn: 'classes') {
inputs.files(sourceSets.main.java)
outputs.file("src/test/resources/sigtest-${version}")
classpath configurations.sigtest
main 'com.sun.tdk.signaturetest.Main'
args 'Setup', '-ApiVersion', version, '-FileName', outputs.getFiles()[0],
'-Classpath', project(':tools').file('jdk8-api.jar').path +
File.pathSeparator + sourceSets.main.output.classesDirs.asPath +
File.pathSeparator + sourceSets.main.compileClasspath.asPath,
'-Package'
args provides
ignoreExitValue true // The exit value is 95 in case of success...
doLast {
if (!outputs.getFiles()[0].exists()) throw new GradleException()
}
}
}
// Apply the biz.aQute.bnd plugin to package the project as an OSGi bundle,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment