HHH-12190 - General tidying of Gradle scripts

- only run the ci build tasks for SNAPSHOT versions - otherwise CI build is triggered for push with non-SNAPSHOT version which publishes the non-SNAPSHOT to Nexus.  In fact this was a proof that we could automate release if we wanted to
This commit is contained in:
Steve Ebersole 2018-01-19 09:56:35 -06:00
parent 091f292b5a
commit 3e5556216c
1 changed files with 7 additions and 9 deletions

View File

@ -58,16 +58,14 @@ task release {
} }
} }
//gradle.projectsEvaluated { g ->
// g.rootProject.subprojects { subproject ->
// Task releaseTask = subproject.tasks.findByName( 'release' )
// if ( releaseTask ) {
// releaseTask.dependsOn tasks.release
// tasks.release.dependsOn releaseTask
// }
// }
//}
task ciBuild
if ( project.isSnapshot ) {
// only run the ci build tasks for SNAPSHOT versions
tasks.ciBuild.dependsOn clean
tasks.ciBuild.dependsOn test
tasks.ciBuild.dependsOn publish
}
task wrapper(type: Wrapper) { task wrapper(type: Wrapper) {
gradleVersion = '4.4' gradleVersion = '4.4'