From 89bd52c7d24d43da985d396d6ffecc322531471d Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Wed, 14 Jul 2021 16:42:57 +0300 Subject: [PATCH] [Test] Provide path to JDK 9/15/17 via toolchains --- compiler/tests-common-new/build.gradle.kts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/compiler/tests-common-new/build.gradle.kts b/compiler/tests-common-new/build.gradle.kts index 71751c43f44..b174a20e1c3 100644 --- a/compiler/tests-common-new/build.gradle.kts +++ b/compiler/tests-common-new/build.gradle.kts @@ -56,6 +56,23 @@ projectTest(jUnit5Enabled = true) { maxHeapSize = "3g" useJUnitPlatform() + + doFirst { + systemProperty( + "JDK_9", + project.getToolchainLauncherFor(JdkMajorVersion.JDK_9).get().metadata.installationPath.asFile.absolutePath + ) + + systemProperty( + "JDK_15_0", + project.getToolchainLauncherFor(JdkMajorVersion.JDK_15).get().metadata.installationPath.asFile.absolutePath + ) + + systemProperty( + "JDK_17_0", + project.getToolchainLauncherFor(JdkMajorVersion.JDK_17).get().metadata.installationPath.asFile.absolutePath + ) + } } testsJar()