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`.
This commit is contained in:
parent
0c697348f4
commit
21b1db2965
|
@ -34,7 +34,9 @@ apply plugin: 'com.github.johnrengelman.shadow'
|
||||||
// have the shadow plugin provide the runShadow task
|
// have the shadow plugin provide the runShadow task
|
||||||
apply plugin: 'application'
|
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'
|
archivesBaseName = 'elasticsearch-benchmarks'
|
||||||
mainClassName = 'org.openjdk.jmh.Main'
|
mainClassName = 'org.openjdk.jmh.Main'
|
||||||
|
|
|
@ -429,6 +429,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')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ public class DocsTestPlugin extends RestTestPlugin {
|
||||||
super.apply(project)
|
super.apply(project)
|
||||||
// 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.remove(project.assemble)
|
||||||
|
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
|
||||||
|
|
|
@ -37,7 +37,9 @@ apply plugin: 'application'
|
||||||
|
|
||||||
group = 'org.elasticsearch.client'
|
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'
|
archivesBaseName = 'client-benchmarks'
|
||||||
mainClassName = 'org.elasticsearch.client.benchmark.BenchmarkMain'
|
mainClassName = 'org.elasticsearch.client.benchmark.BenchmarkMain'
|
||||||
|
|
|
@ -27,7 +27,9 @@ esplugin {
|
||||||
classname 'org.elasticsearch.plugin.noop.NoopPlugin'
|
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"
|
compileJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-try,-unchecked"
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,9 @@ if (project.name == 'bwc-stable-snapshot') {
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
apply plugin: 'distribution'
|
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 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('\\.')
|
||||||
|
|
|
@ -4,6 +4,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')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,9 @@ esplugin {
|
||||||
description 'Demonstrates all the pluggable Java entry points in Elasticsearch'
|
description 'Demonstrates all the pluggable Java entry points in Elasticsearch'
|
||||||
classname 'org.elasticsearch.plugin.example.JvmExamplePlugin'
|
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
|
// no unit tests
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
|
|
|
@ -19,4 +19,6 @@
|
||||||
|
|
||||||
apply plugin: 'elasticsearch.build'
|
apply plugin: 'elasticsearch.build'
|
||||||
test.enabled = false
|
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')
|
||||||
|
|
Loading…
Reference in New Issue