From 75a83dcef7353b6afabe69683c05f1a9e4626f5b Mon Sep 17 00:00:00 2001 From: Jay Modi Date: Fri, 22 Nov 2019 10:13:25 -0700 Subject: [PATCH] Run build-tools test with Gradle jdk (#49459) The test task is configured to use the runtime java version, but there are issues with the version of groovy used by gradle pre 6.0. In order to workaround this, we use the Gradle JDK to execute the build-tools tests. Closes #49404 Closes #49253 --- buildSrc/build.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index ed5009b38cc7d..61caf1bbbe26b 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -17,6 +17,7 @@ * under the License. */ +import org.gradle.internal.jvm.Jvm import org.gradle.util.GradleVersion plugins { @@ -225,8 +226,13 @@ if (project != rootProject) { } check.dependsOn(integTest) + // for now we hardcode the tests for our build to use the gradle jvm. + tasks.withType(Test).configureEach { + it.executable = Jvm.current().getJavaExecutable() + } + /* - * We alread configure publication and we don't need or want this one that + * We already configure publication and we don't need or want this one that * comes from the java-gradle-plugin. */ afterEvaluate {