Use Gradle wrapper when building BWC
This commit modifies the BWC build to invoke the Gradle wrapper. The motivation for this is two-fold: - BWC versions might be dependent on a different version of Gradle than the current version of Gradle - in a follow-up we are going to need to be able to set JAVA_HOME to a different value than the current value of JAVA_HOME Relates elastic/x-pack-elasticsearch#3502 Original commit: elastic/x-pack-elasticsearch@22062f635b
This commit is contained in:
parent
59044181d8
commit
e92947e1b9
|
@ -183,10 +183,23 @@ subprojects {
|
||||||
}
|
}
|
||||||
|
|
||||||
File bwcZip = file("${xpackCheckoutDir}/plugin/build/distributions/x-pack-${bwcVersion}.zip")
|
File bwcZip = file("${xpackCheckoutDir}/plugin/build/distributions/x-pack-${bwcVersion}.zip")
|
||||||
task buildBwcVersion(type: GradleBuild) {
|
task buildBwcVersion(type: Exec) {
|
||||||
dependsOn checkoutXPackBwcBranch, checkoutElasticsearchBwcBranch, writeElasticsearchBuildMetadata, writeXPackBuildMetadata
|
dependsOn checkoutXPackBwcBranch, checkoutElasticsearchBwcBranch, writeElasticsearchBuildMetadata, writeXPackBuildMetadata
|
||||||
dir = xpackCheckoutDir
|
workingDir = xpackCheckoutDir
|
||||||
tasks = [':x-pack-elasticsearch:plugin:assemble']
|
executable = new File(xpackCheckoutDir, 'gradlew').toString()
|
||||||
|
final ArrayList<String> commandLineArgs = [":x-pack-elasticsearch:plugin:assemble"]
|
||||||
|
final LogLevel logLevel = gradle.startParameter.logLevel
|
||||||
|
if ([LogLevel.QUIET, LogLevel.WARN, LogLevel.INFO, LogLevel.DEBUG].contains(logLevel)) {
|
||||||
|
commandLineArgs << "--${logLevel.name().toLowerCase(Locale.ENGLISH)}"
|
||||||
|
}
|
||||||
|
final String showStacktraceName = gradle.startParameter.showStacktrace.name()
|
||||||
|
assert ["INTERNAL_EXCEPTIONS", "ALWAYS", "ALWAYS_FULL"].contains(showStacktraceName)
|
||||||
|
if (showStacktraceName.equals("ALWAYS")) {
|
||||||
|
commandLineArgs << "--stacktrace"
|
||||||
|
} else if (showStacktraceName.equals("ALWAYS_FULL")) {
|
||||||
|
commandLineArgs << "--full-stacktrace"
|
||||||
|
}
|
||||||
|
args = commandLineArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
|
|
Loading…
Reference in New Issue