Skip to content

Commit 016235c

Browse files
committed
build: pin the metadata generator's test sources to JVM 17
Only the main Kotlin sources had a JVM target, so on a JDK newer than 17 the test sources targeted that JDK and Kotlin refused the mismatch with the Java target. The tests could not be built on CI's JDK 21.
1 parent baa720c commit 016235c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎test-app/build-tools/android-metadata-generator/build.gradle‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ compileKotlin {
5151
}
5252
}
5353

54+
// Without this the test sources target whatever JDK runs the build, and Kotlin refuses a
55+
// target that differs from the Java one.
56+
compileTestKotlin {
57+
kotlinOptions {
58+
jvmTarget = '17'
59+
}
60+
}
61+
5462
repositories {
5563
google()
5664
mavenCentral()

0 commit comments

Comments
 (0)