Skip to content

Commit

Permalink
Fix java version of build-tools test
Browse files Browse the repository at this point in the history
  • Loading branch information
alpar-t committed Nov 18, 2019
1 parent fcac3fb commit 23a26ce
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions gradle/runtime-jdk-provision.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@ import org.elasticsearch.gradle.info.BuildParams
apply plugin: 'elasticsearch.jdk-download'

jdks {
provisioned_runtime {
vendor = VersionProperties.bundledJdkVendor
version = VersionProperties.getBundledJdk(OS.current().name().toLowerCase())
platform = OS.current().name().toLowerCase()
}
provisioned_runtime {
vendor = VersionProperties.bundledJdkVendor
version = VersionProperties.getBundledJdk(OS.current().name().toLowerCase())
platform = OS.current().name().toLowerCase()
}
}

allprojects {
if (project.path != ":build-tools") {
// Build tools doesn't support java 8 still used in CI
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()
}
if (BuildParams.getIsRuntimeJavaHomeSet()) {
test.executable = "${BuildParams.runtimeJavaHome}/bin/java"
} else {
test.dependsOn(rootProject.jdks.provisioned_runtime)
test.executable = rootProject.jdks.provisioned_runtime.getBinJavaPath()
}
}
}
}
}

0 comments on commit 23a26ce

Please sign in to comment.