THRIFT-5702 Support Java 8
Client: Java
Patch: Fokko Driesprong
This closes #2785
diff --git a/lib/kotlin/build.gradle.kts b/lib/kotlin/build.gradle.kts
index 0ec8859..cd52e7f 100644
--- a/lib/kotlin/build.gradle.kts
+++ b/lib/kotlin/build.gradle.kts
@@ -36,10 +36,14 @@
kotlin {
jvmToolchain {
- (this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(11))
+ (this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(8))
}
}
+tasks.withType<KotlinCompile> {
+ kotlinOptions.jvmTarget = "1.8"
+}
+
tasks {
if (JavaVersion.current().isJava11Compatible) {
ktfmt {