2019-11-18 03:27:28 -05:00
|
|
|
import org.elasticsearch.gradle.OS
|
|
|
|
import org.elasticsearch.gradle.VersionProperties
|
|
|
|
import org.elasticsearch.gradle.info.BuildParams
|
|
|
|
|
|
|
|
apply plugin: 'elasticsearch.jdk-download'
|
|
|
|
|
|
|
|
jdks {
|
2019-11-18 04:13:40 -05:00
|
|
|
provisioned_runtime {
|
|
|
|
vendor = VersionProperties.bundledJdkVendor
|
|
|
|
version = VersionProperties.getBundledJdk(OS.current().name().toLowerCase())
|
|
|
|
platform = OS.current().name().toLowerCase()
|
|
|
|
}
|
2019-11-18 03:27:28 -05:00
|
|
|
}
|
|
|
|
|
2019-11-22 13:59:46 -05:00
|
|
|
configure(allprojects - project(':build-tools')) {
|
|
|
|
project.tasks.withType(Test).configureEach { Test test ->
|
|
|
|
if (BuildParams.getIsRuntimeJavaHomeSet()) {
|
|
|
|
test.executable = "${BuildParams.runtimeJavaHome}/bin/java"
|
|
|
|
} else {
|
|
|
|
test.dependsOn(rootProject.jdks.provisioned_runtime)
|
|
|
|
test.executable = rootProject.jdks.provisioned_runtime.getBinJavaPath()
|
2019-11-18 03:27:28 -05:00
|
|
|
}
|
2019-11-18 04:13:40 -05:00
|
|
|
}
|
|
|
|
}
|