Target JVM 11

pull/1806/head
Quentin Hibon 2 years ago
parent 3b0fba12f5
commit a9f028a34b

@ -29,6 +29,17 @@ tasks.compileLint {
dependsOn("updateTranslators")
}
/*
Added on top of kotlinOptions to work around this issue:
https://youtrack.jetbrains.com/issue/KTIJ-24311/task-current-target-is-17-and-kaptGenerateStubsProductionDebugKotlin-task-current-target-is-1.8-jvm-target-compatibility-should#focus=Comments-27-6798448.0-0
Updating gradle might fix this, so try again in the future to remove this and run:
./gradlew --rerun-tasks :uhabits-android:kaptGenerateStubsReleaseKotlin
If this doesn't produce any warning, try to remove it.
*/
kotlin {
jvmToolchain(11)
}
android {
compileSdk = 32
@ -69,8 +80,11 @@ android {
compileOptions {
isCoreLibraryDesugaringEnabled = true
targetCompatibility(JavaVersion.VERSION_1_8)
sourceCompatibility(JavaVersion.VERSION_1_8)
targetCompatibility(JavaVersion.VERSION_11)
sourceCompatibility(JavaVersion.VERSION_11)
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
buildFeatures {

@ -24,6 +24,7 @@ plugins {
kotlin {
jvm().withJava()
jvmToolchain(11)
sourceSets {
val commonMain by getting {
@ -61,7 +62,7 @@ kotlin {
implementation("org.xerial:sqlite-jdbc:3.42.0.0")
implementation("org.hamcrest:hamcrest:2.2")
implementation("org.apache.commons:commons-io:1.3.2")
implementation("org.mockito.kotlin:mockito-kotlin:4.1.0")
implementation("org.mockito.kotlin:mockito-kotlin:5.0.0")
implementation("org.junit.jupiter:junit-jupiter:5.10.0")
}
}

Loading…
Cancel
Save