Skip to content

Commit 5cf9238

Browse files
authored
Run build-tools test with Gradle jdk (#49459) (#49498)
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
1 parent 25c7bf9 commit 5cf9238

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

buildSrc/build.gradle

+7-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* under the License.
1818
*/
1919

20+
import org.gradle.internal.jvm.Jvm
2021
import org.gradle.util.GradleVersion
2122

2223
plugins {
@@ -225,8 +226,13 @@ if (project != rootProject) {
225226
}
226227
check.dependsOn(integTest)
227228

229+
// for now we hardcode the tests for our build to use the gradle jvm.
230+
tasks.withType(Test).configureEach {
231+
it.executable = Jvm.current().getJavaExecutable()
232+
}
233+
228234
/*
229-
* We alread configure publication and we don't need or want this one that
235+
* We already configure publication and we don't need or want this one that
230236
* comes from the java-gradle-plugin.
231237
*/
232238
afterEvaluate {

0 commit comments

Comments
 (0)