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' apply plugin: 'application'
mainClassName = 'org.openjdk.jmh.Main' mainClassName = 'org.openjdk.jmh.Main'
// Not published so no need to assemble assemble.enabled = false
tasks.remove(assemble)
build.dependsOn.remove('assemble')
archivesBaseName = 'elasticsearch-benchmarks' archivesBaseName = 'elasticsearch-benchmarks'
test.enabled = false test.enabled = false

View File

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

View File

@ -547,7 +547,7 @@ class BuildPlugin implements Plugin<Project> {
} }
// build poms with assemble (if the assemble task exists) // build poms with assemble (if the assemble task exists)
Task assemble = project.tasks.findByName('assemble') Task assemble = project.tasks.findByName('assemble')
if (assemble) { if (assemble && assemble.enabled) {
assemble.dependsOn(generatePOMTask) 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 // The distribution can be configured with -Dtests.distribution on the command line
project.integTestCluster.distribution = System.getProperty('tests.distribution', 'zip') project.integTestCluster.distribution = System.getProperty('tests.distribution', 'zip')
// Docs are published separately so no need to assemble // Docs are published separately so no need to assemble
project.tasks.remove(project.assemble) project.tasks.assemble.enabled = false
project.build.dependsOn.remove('assemble')
Map<String, String> defaultSubstitutions = [ Map<String, String> defaultSubstitutions = [
/* These match up with the asciidoc syntax for substitutions but /* These match up with the asciidoc syntax for substitutions but
* the values may differ. In particular {version} needs to resolve * the values may differ. In particular {version} needs to resolve

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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