Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jamie Mansfield
asm
Commits
8776cc0d
Commit
8776cc0d
authored
Apr 21, 2018
by
Eric Bruneton
Browse files
Add a task to generate a sigtest file for the current version.
parent
23337ecf
Changes
1
Hide whitespace changes
Inline
Side-by-side
build.gradle
View file @
8776cc0d
...
...
@@ -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,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment