davidliu
Committed by GitHub

Revert java target to Java 1.8 (#328)

1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4"> 2 <project version="4">
3 <component name="CompilerConfiguration"> 3 <component name="CompilerConfiguration">
4 - <bytecodeTargetLevel target="17" /> 4 + <bytecodeTargetLevel target="1.8" />
5 </component> 5 </component>
6 </project> 6 </project>
@@ -66,6 +66,16 @@ subprojects { @@ -66,6 +66,16 @@ subprojects {
66 toggleOffOn() 66 toggleOffOn()
67 } 67 }
68 } 68 }
  69 +
  70 + // From Gradle 8 onwards, Kapt no longer automatically picks up jvmTarget
  71 + // from normal KotlinOptions. Must be manually set.
  72 + // JvmToolchain should not be used since it changes the actual JDK used.
  73 + tasks.withType(org.jetbrains.kotlin.gradle.tasks.KaptGenerateStubs).configureEach {
  74 + kotlinOptions {
  75 + jvmTarget = java_version
  76 + }
  77 + }
  78 +
69 } 79 }
70 80
71 task clean(type: Delete) { 81 task clean(type: Delete) {
@@ -3,7 +3,7 @@ ext { @@ -3,7 +3,7 @@ ext {
3 compose_version = '1.2.1' 3 compose_version = '1.2.1'
4 compose_compiler_version = '1.4.5' 4 compose_compiler_version = '1.4.5'
5 kotlin_version = '1.8.20' 5 kotlin_version = '1.8.20'
6 - java_version = JavaVersion.VERSION_17 6 + java_version = JavaVersion.VERSION_1_8
7 dokka_version = '1.5.0' 7 dokka_version = '1.5.0'
8 androidSdk = [ 8 androidSdk = [
9 compileVersion: 33, 9 compileVersion: 33,
@@ -8,6 +8,11 @@ java { @@ -8,6 +8,11 @@ java {
8 sourceCompatibility = java_version 8 sourceCompatibility = java_version
9 targetCompatibility = java_version 9 targetCompatibility = java_version
10 } 10 }
  11 +compileKotlin {
  12 + kotlinOptions {
  13 + jvmTarget = java_version
  14 + }
  15 +}
11 16
12 dependencies { 17 dependencies {
13 18