File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,13 +49,8 @@ dependencies {
4949
5050tasks.test {
5151 useJUnitPlatform()
52- val currentJavaMajor = JavaVersion .current().majorVersion.toIntOrNull() ? : 0
53- if (currentJavaMajor >= 21 ) {
54- jvmArgs(" --enable-native-access=ALL-UNNAMED" )
55- }
56- if (currentJavaMajor >= 24 ) {
57- jvmArgs(" --sun-misc-unsafe-memory-access=allow" )
58- }
52+ // JVM toolchain is pinned to 21; --enable-native-access is supported from Java 21 onwards.
53+ jvmArgs(" --enable-native-access=ALL-UNNAMED" )
5954 testLogging {
6055 showStandardStreams = false
6156 }
Original file line number Diff line number Diff line change @@ -206,6 +206,12 @@ subprojects {
206206 group = rootProject.group
207207 version = rootProject.version
208208
209+ plugins.withId(" org.jetbrains.kotlin.jvm" ) {
210+ extensions.configure< org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension > {
211+ jvmToolchain(21 )
212+ }
213+ }
214+
209215 repositories {
210216 maven(" https://maven.aliyun.com/repository/central" )
211217 maven(" https://mirrors.cloud.tencent.com/nexus/repository/maven-public/" )
You can’t perform that action at this time.
0 commit comments