diff --git a/benchmarks/build.gradle b/benchmarks/build.gradle index 45e20392b8a..44687f154ff 100644 --- a/benchmarks/build.gradle +++ b/benchmarks/build.gradle @@ -34,7 +34,9 @@ apply plugin: 'com.github.johnrengelman.shadow' // have the shadow plugin provide the runShadow task apply plugin: 'application' -tasks.remove(assemble) // Not published so no need to assemble +// Not published so no need to assemble +tasks.remove(assemble) +build.dependsOn.remove('assemble') archivesBaseName = 'elasticsearch-benchmarks' mainClassName = 'org.openjdk.jmh.Main' diff --git a/build.gradle b/build.gradle index 4806f7303f5..05baaebb276 100644 --- a/build.gradle +++ b/build.gradle @@ -429,6 +429,7 @@ gradle.projectsEvaluated { Task assemble = project.tasks.findByName('assemble') if (assemble) { project.tasks.remove(assemble) + project.build.dependsOn.remove('assemble') } } } diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy index 44670e20744..d2802638ce5 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy @@ -34,6 +34,7 @@ public class DocsTestPlugin extends RestTestPlugin { super.apply(project) // Docs are published separately so no need to assemble project.tasks.remove(project.assemble) + project.build.dependsOn.remove('assemble') Map defaultSubstitutions = [ /* These match up with the asciidoc syntax for substitutions but * the values may differ. In particular {version} needs to resolve diff --git a/client/benchmark/build.gradle b/client/benchmark/build.gradle index 0ba9bd71c25..07186c80270 100644 --- a/client/benchmark/build.gradle +++ b/client/benchmark/build.gradle @@ -37,7 +37,9 @@ apply plugin: 'application' group = 'org.elasticsearch.client' -tasks.remove(assemble) // Not published so no need to assemble +// Not published so no need to assemble +tasks.remove(assemble) +build.dependsOn.remove('assemble') archivesBaseName = 'client-benchmarks' mainClassName = 'org.elasticsearch.client.benchmark.BenchmarkMain' diff --git a/client/client-benchmark-noop-api-plugin/build.gradle b/client/client-benchmark-noop-api-plugin/build.gradle index 17fe10fc8f7..bee41034c3c 100644 --- a/client/client-benchmark-noop-api-plugin/build.gradle +++ b/client/client-benchmark-noop-api-plugin/build.gradle @@ -27,7 +27,9 @@ esplugin { classname 'org.elasticsearch.plugin.noop.NoopPlugin' } -tasks.remove(assemble) // Not published so no need to assemble +// Not published so no need to assemble +tasks.remove(assemble) +build.dependsOn.remove('assemble') compileJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-try,-unchecked" diff --git a/distribution/bwc/build.gradle b/distribution/bwc/build.gradle index f1bb123411c..521f4636f24 100644 --- a/distribution/bwc/build.gradle +++ b/distribution/bwc/build.gradle @@ -49,7 +49,9 @@ if (project.name == 'bwc-stable-snapshot') { if (enabled) { apply plugin: 'distribution' - tasks.remove(assemble) // Not published so no need to assemble + // Not published so no need to assemble + tasks.remove(assemble) + build.dependsOn.remove('assemble') def (String major, String minor, String bugfix) = bwcVersion.split('\\.') def (String currentMajor, String currentMinor, String currentBugfix) = version.split('\\.') diff --git a/plugins/examples/build.gradle b/plugins/examples/build.gradle index 150e2826f39..47db55b3b33 100644 --- a/plugins/examples/build.gradle +++ b/plugins/examples/build.gradle @@ -4,6 +4,7 @@ gradle.projectsEvaluated { Task assemble = project.tasks.findByName('assemble') if (assemble) { project.tasks.remove(assemble) + project.build.dependsOn.remove('assemble') } } } diff --git a/plugins/jvm-example/build.gradle b/plugins/jvm-example/build.gradle index 5e4523adc0f..78e54d8bc81 100644 --- a/plugins/jvm-example/build.gradle +++ b/plugins/jvm-example/build.gradle @@ -21,7 +21,9 @@ esplugin { description 'Demonstrates all the pluggable Java entry points in Elasticsearch' classname 'org.elasticsearch.plugin.example.JvmExamplePlugin' } -tasks.remove(assemble) // Not published so no need to assemble +// Not published so no need to assemble +tasks.remove(assemble) +build.dependsOn.remove('assemble') // no unit tests test.enabled = false diff --git a/test/fixtures/example-fixture/build.gradle b/test/fixtures/example-fixture/build.gradle index 7eb6afd50e4..225a2cf9deb 100644 --- a/test/fixtures/example-fixture/build.gradle +++ b/test/fixtures/example-fixture/build.gradle @@ -19,4 +19,6 @@ apply plugin: 'elasticsearch.build' test.enabled = false -tasks.remove(assemble) // Not published so no need to assemble +// Not published so no need to assemble +tasks.remove(assemble) +build.dependsOn.remove('assemble')