Skip to content

Instantly share code, notes, and snippets.

@fergsmyth
Created May 30, 2014 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fergsmyth/357af8137d58993320c1 to your computer and use it in GitHub Desktop.
Save fergsmyth/357af8137d58993320c1 to your computer and use it in GitHub Desktop.
task svnTest(type: Exec) {
commandLine 'svnversion'
standardOutput = new ByteArrayOutputStream()
doLast{
project.ext.svnversion = standardOutput.toString()
}
}
configure(subprojects.findAll {it.name != 'somename'}) {
jar {
gradle.taskGraph.whenReady{ taskGraph ->
if (taskGraph.hasTask(release)) {
manifest {
attributes(
"Implementation-Version": version,
"Implementation-Date": new java.util.Date().toString(),
"SVN-Revision": rootProject.svnversion
)
}
} else {
manifest {
attributes(
"Implementation-Version": version
)
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment