Disable assemble task instead of removing it (#33348)

This commit is contained in:
Alpar Torok 2018-09-04 07:32:14 +03:00 committed by GitHub
parent 78df00ff24
commit 7f7e8fd733
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 14 additions and 27 deletions

View File

@ -21,10 +21,7 @@ apply plugin: 'elasticsearch.build'
apply plugin: 'application'
mainClassName = 'org.openjdk.jmh.Main'
// Not published so no need to assemble
tasks.remove(assemble)
build.dependsOn.remove('assemble')
assemble.enabled = false
archivesBaseName = 'elasticsearch-benchmarks'
test.enabled = false

View File

@ -579,13 +579,11 @@ gradle.projectsEvaluated {
if (project.path.startsWith(':qa')) {
Task assemble = project.tasks.findByName('assemble')
if (assemble) {
project.tasks.remove(assemble)
project.build.dependsOn.remove('assemble')
assemble.enabled = false
}
Task dependenciesInfo = project.tasks.findByName('dependenciesInfo')
if (dependenciesInfo) {
project.tasks.remove(dependenciesInfo)
project.precommit.dependsOn.remove('dependenciesInfo')
dependenciesInfo.enabled = false
}
}
}

View File

@ -547,7 +547,7 @@ class BuildPlugin implements Plugin<Project> {
}
// build poms with assemble (if the assemble task exists)
Task assemble = project.tasks.findByName('assemble')
if (assemble) {
if (assemble && assemble.enabled) {
assemble.dependsOn(generatePOMTask)
}
}

View File

@ -35,8 +35,7 @@ public class DocsTestPlugin extends RestTestPlugin {
// The distribution can be configured with -Dtests.distribution on the command line
project.integTestCluster.distribution = System.getProperty('tests.distribution', 'zip')
// Docs are published separately so no need to assemble
project.tasks.remove(project.assemble)
project.build.dependsOn.remove('assemble')
project.tasks.assemble.enabled = false
Map<String, String> defaultSubstitutions = [
/* These match up with the asciidoc syntax for substitutions but
* the values may differ. In particular {version} needs to resolve

View File

@ -23,8 +23,7 @@ apply plugin: 'application'
group = 'org.elasticsearch.client'
// Not published so no need to assemble
tasks.remove(assemble)
build.dependsOn.remove('assemble')
assemble.enabled = true
archivesBaseName = 'client-benchmarks'
mainClassName = 'org.elasticsearch.client.benchmark.BenchmarkMain'

View File

@ -28,8 +28,7 @@ esplugin {
}
// Not published so no need to assemble
tasks.remove(assemble)
build.dependsOn.remove('assemble')
assemble.enabled = false
dependencyLicenses.enabled = false
dependenciesInfo.enabled = false

View File

@ -50,8 +50,7 @@ subprojects {
apply plugin: 'distribution'
// Not published so no need to assemble
tasks.remove(assemble)
build.dependsOn.remove('assemble')
assemble.enabled = false
File checkoutDir = file("${buildDir}/bwc/checkout-${bwcBranch}")

View File

@ -3,8 +3,7 @@ gradle.projectsEvaluated {
subprojects {
Task assemble = project.tasks.findByName('assemble')
if (assemble) {
project.tasks.remove(assemble)
project.build.dependsOn.remove('assemble')
assemble.enabled = false
}
}
}

View File

@ -5,8 +5,7 @@ gradle.projectsEvaluated {
subprojects {
Task assemble = project.tasks.findByName('assemble')
if (assemble) {
project.tasks.remove(assemble)
project.build.dependsOn.remove('assemble')
assemble.enabled = false
}
}
}

View File

@ -20,12 +20,11 @@ gradle.projectsEvaluated {
subprojects {
Task assemble = project.tasks.findByName('assemble')
if (assemble) {
project.tasks.remove(assemble)
project.build.dependsOn.remove('assemble')
assemble.enabled = false
}
Task dependenciesInfo = project.tasks.findByName('dependenciesInfo')
if (dependenciesInfo) {
project.precommit.dependsOn.remove('dependenciesInfo')
dependenciesInfo.enabled = false
}
}
}

View File

@ -25,12 +25,11 @@ gradle.projectsEvaluated {
subprojects {
Task assemble = project.tasks.findByName('assemble')
if (assemble) {
project.tasks.remove(assemble)
project.build.dependsOn.remove('assemble')
assemble.enabled = false
}
Task dependenciesInfo = project.tasks.findByName('dependenciesInfo')
if (dependenciesInfo) {
project.precommit.dependsOn.remove('dependenciesInfo')
dependenciesInfo.enabled = false
}
}
}