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:
parent
091f292b5a
commit
3e5556216c
16
build.gradle
16
build.gradle
|
@ -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'
|
||||||
|
|
Loading…
Reference in New Issue