HHH-17347 Support for JDK which do not support JFR events
This commit is contained in:
parent
8492d1c4b8
commit
afbce7cf8a
|
@ -18,7 +18,7 @@ org.gradle.caching=true
|
|||
# but it won't find it and will fail.
|
||||
# It's just a JRE, so it's perfectly normal that the JDK is not present;
|
||||
# the JRE is under /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.265.b01-1.fc32.x86_64/jre
|
||||
org.gradle.java.installations.auto-detect=true
|
||||
org.gradle.java.installations.auto-detect=false
|
||||
# We can't rely on Gradle's auto-download of JDKs as it doesn't support EA releases.
|
||||
# See https://github.com/gradle/gradle/blob/fc7ea24f3c525d8d12a4346eb0f15976a6be9414/subprojects/platform-jvm/src/main/java/org/gradle/jvm/toolchain/install/internal/AdoptOpenJdkRemoteBinary.java#L114
|
||||
org.gradle.java.installations.auto-download=false
|
||||
|
|
|
@ -16,16 +16,12 @@ dependencies {
|
|||
testImplementation testLibs.jfrUnit
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
//Testing JFR events require JDK > 16
|
||||
javaCompiler = javaToolchains.compilerFor {
|
||||
languageVersion = JavaLanguageVersion.of( 17 )
|
||||
}
|
||||
|
||||
// JfrUnit requires JDK 17
|
||||
compileTestJava.onlyIf{
|
||||
jdkVersions.test.release.asInt() >= 17 && jdkVersions.explicit
|
||||
}
|
||||
|
||||
test {
|
||||
//Testing JFR events require JDK > 16
|
||||
javaLauncher = javaToolchains.launcherFor {
|
||||
languageVersion = JavaLanguageVersion.of( 17 )
|
||||
}
|
||||
test.onlyIf {
|
||||
jdkVersions.test.release.asInt() >= 17 && jdkVersions.explicit
|
||||
}
|
Loading…
Reference in New Issue