From f72ef9b5fdb0699c320e5c983c0fe6122aaeea94 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Mon, 5 Nov 2018 16:16:00 -0500 Subject: [PATCH] Build: Pull "skip assemble on qa" to common build (#35214) Pull all of the logic that we use to skip the `assemble` and `dependenciesInfo` tasks on `qa` projects into one spot in our root build file. --- build.gradle | 8 +++++--- x-pack/plugin/ccr/qa/build.gradle | 11 ----------- x-pack/plugin/graph/qa/build.gradle | 13 ------------- x-pack/plugin/ilm/build.gradle | 12 ------------ x-pack/plugin/ilm/qa/build.gradle | 11 ----------- x-pack/plugin/ml/qa/build.gradle | 13 ------------- x-pack/plugin/sql/qa/build.gradle | 9 --------- x-pack/qa/build.gradle | 15 --------------- 8 files changed, 5 insertions(+), 87 deletions(-) diff --git a/build.gradle b/build.gradle index 4997cfff5b0..9857d5d7a21 100644 --- a/build.gradle +++ b/build.gradle @@ -555,11 +555,13 @@ wrapper { } } -/* Remove assemble/dependenciesInfo on all qa projects because we don't need to publish - * artifacts for them. */ gradle.projectsEvaluated { subprojects { - if (project.path.startsWith(':qa')) { + /* + * Remove assemble/dependenciesInfo on all qa projects because we don't + * need to publish artifacts for them. + */ + if (project.name.equals('qa') || project.path.contains(':qa:')) { Task assemble = project.tasks.findByName('assemble') if (assemble) { assemble.enabled = false diff --git a/x-pack/plugin/ccr/qa/build.gradle b/x-pack/plugin/ccr/qa/build.gradle index f408e6a78b6..d3e95d997c3 100644 --- a/x-pack/plugin/ccr/qa/build.gradle +++ b/x-pack/plugin/ccr/qa/build.gradle @@ -15,14 +15,3 @@ subprojects { } } } - -/* Remove assemble on all qa projects because we don't need to publish - * artifacts for them. */ -gradle.projectsEvaluated { - subprojects { - Task assemble = project.tasks.findByName('assemble') - if (assemble) { - assemble.enabled = false - } - } -} diff --git a/x-pack/plugin/graph/qa/build.gradle b/x-pack/plugin/graph/qa/build.gradle index 5b3dcd7c850..35bd236df5c 100644 --- a/x-pack/plugin/graph/qa/build.gradle +++ b/x-pack/plugin/graph/qa/build.gradle @@ -15,16 +15,3 @@ subprojects { } } } - -gradle.projectsEvaluated { - subprojects { - Task assemble = project.tasks.findByName('assemble') - if (assemble) { - assemble.enabled = false - } - Task dependenciesInfo = project.tasks.findByName('dependenciesInfo') - if (dependenciesInfo) { - dependenciesInfo.enabled = false - } - } -} diff --git a/x-pack/plugin/ilm/build.gradle b/x-pack/plugin/ilm/build.gradle index f9ced7dc38e..71def893781 100644 --- a/x-pack/plugin/ilm/build.gradle +++ b/x-pack/plugin/ilm/build.gradle @@ -27,18 +27,6 @@ gradle.projectsEvaluated { .each { check.dependsOn it.check } } - -/* Remove assemble on all qa projects because we don't need to publish - * artifacts for them. */ -gradle.projectsEvaluated { - subprojects { - Task assemble = project.tasks.findByName('assemble') - if (assemble) { - assemble.enabled = false - } - } -} - integTest.enabled = false run { diff --git a/x-pack/plugin/ilm/qa/build.gradle b/x-pack/plugin/ilm/qa/build.gradle index 881d6c5420f..9525da5f4fe 100644 --- a/x-pack/plugin/ilm/qa/build.gradle +++ b/x-pack/plugin/ilm/qa/build.gradle @@ -16,16 +16,5 @@ subprojects { } } -/* Remove assemble on all qa projects because we don't need to publish - * artifacts for them. */ -gradle.projectsEvaluated { - subprojects { - Task assemble = project.tasks.findByName('assemble') - if (assemble) { - assemble.enabled = false - } - } -} - // the qa modules does not have any source files licenseHeaders.enabled = false diff --git a/x-pack/plugin/ml/qa/build.gradle b/x-pack/plugin/ml/qa/build.gradle index 5b3dcd7c850..35bd236df5c 100644 --- a/x-pack/plugin/ml/qa/build.gradle +++ b/x-pack/plugin/ml/qa/build.gradle @@ -15,16 +15,3 @@ subprojects { } } } - -gradle.projectsEvaluated { - subprojects { - Task assemble = project.tasks.findByName('assemble') - if (assemble) { - assemble.enabled = false - } - Task dependenciesInfo = project.tasks.findByName('dependenciesInfo') - if (dependenciesInfo) { - dependenciesInfo.enabled = false - } - } -} diff --git a/x-pack/plugin/sql/qa/build.gradle b/x-pack/plugin/sql/qa/build.gradle index aa6af9ee17a..e4b21281434 100644 --- a/x-pack/plugin/sql/qa/build.gradle +++ b/x-pack/plugin/sql/qa/build.gradle @@ -125,13 +125,4 @@ subprojects { setting 'script.max_compilations_rate', '1000/1m' } } - - Task assemble = project.tasks.findByName('assemble') - if (assemble) { - assemble.enabled = false - } - Task dependenciesInfo = project.tasks.findByName('dependenciesInfo') - if (dependenciesInfo) { - dependenciesInfo.enabled = false - } } diff --git a/x-pack/qa/build.gradle b/x-pack/qa/build.gradle index ae77c8f8935..7d705d5b0dc 100644 --- a/x-pack/qa/build.gradle +++ b/x-pack/qa/build.gradle @@ -18,18 +18,3 @@ subprojects { } } } - -/* Remove assemble on all qa projects because we don't need to publish - * artifacts for them. */ -gradle.projectsEvaluated { - subprojects { - Task assemble = project.tasks.findByName('assemble') - if (assemble) { - assemble.enabled = false - } - Task dependenciesInfo = project.tasks.findByName('dependenciesInfo') - if (dependenciesInfo) { - dependenciesInfo.enabled = false - } - } -}