Remove assemble from build task when assemble removed

Removes the `assemble` task from the `build` task when we have
removed `assemble` from the project. We removed `assemble` from
projects that aren't published so our releases will be faster. But
That broke CI because CI builds with `gradle precommit build` and,
it turns out, that `build` includes `check` and `assemble`. With
this change CI will only run `check` for projects without an
`assemble`.

Original commit: elastic/x-pack-elasticsearch@d01b0df1d9
This commit is contained in:
Nik Everett 2017-06-16 17:19:24 -04:00
parent 4967d424f6
commit 1559f85c73
2 changed files with 3 additions and 0 deletions

View File

@ -31,7 +31,9 @@ subprojects {
} }
if (enabled) { if (enabled) {
apply plugin: 'distribution' apply plugin: 'distribution'
// Not published so no need to assemble
tasks.remove(assemble) tasks.remove(assemble)
build.dependsOn.remove('assemble')
def (String major, String minor, String bugfix) = bwcVersion.split('\\.') def (String major, String minor, String bugfix) = bwcVersion.split('\\.')
def (String currentMajor, String currentMinor, String currentBugfix) = version.split('\\.') def (String currentMajor, String currentMinor, String currentBugfix) = version.split('\\.')

View File

@ -6,6 +6,7 @@ gradle.projectsEvaluated {
Task assemble = project.tasks.findByName('assemble') Task assemble = project.tasks.findByName('assemble')
if (assemble) { if (assemble) {
project.tasks.remove(assemble) project.tasks.remove(assemble)
project.build.dependsOn.remove('assemble')
} }
} }
} }