Skip to content

Commit 506c783

Browse files
objectbox-kotlin: allow compiling with Kotlin back to 1.4
1 parent 25ed11c commit 506c783

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

objectbox-kotlin/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ tasks.withType(JavaCompile).configureEach {
1414
options.release.set(8)
1515
}
1616

17-
// Produce Java 8 byte code, would default to Java 6.
1817
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
1918
kotlinOptions {
19+
// Produce Java 8 byte code, would default to Java 6.
2020
jvmTarget = "1.8"
21+
// Try to use APIs at most one version newer than lowest supported (notably by Gradle plugin).
22+
// Note: Kotlin is able to compile with binaries up to one later version.
23+
apiVersion = "1.5"
2124
}
2225
}
2326

0 commit comments

Comments
 (0)