Skip to content

Commit 2af9d58

Browse files
Merge pull request #2883 from Iamlooker/fix/jvm-configuration
build: Fix conflicting JVM setup
2 parents e21fd95 + 427e9d6 commit 2af9d58

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

app/build.gradle.kts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import com.android.build.gradle.internal.tasks.factory.dependsOn
2+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
23

34
plugins {
45
alias(libs.plugins.com.android.application)
@@ -74,16 +75,6 @@ android {
7475
}
7576
}
7677

77-
compileOptions {
78-
encoding = "UTF-8"
79-
80-
// Flag to enable support for the new language APIs
81-
isCoreLibraryDesugaringEnabled = true
82-
83-
sourceCompatibility = JavaVersion.VERSION_17
84-
targetCompatibility = JavaVersion.VERSION_17
85-
}
86-
8778
sourceSets {
8879
getByName("test") {
8980
resources.srcDirs("src/test/res")
@@ -102,10 +93,16 @@ android {
10293
lint {
10394
lintConfig = file("lint.xml")
10495
}
105-
kotlinOptions {
106-
jvmTarget = "21"
96+
kotlin {
97+
compilerOptions {
98+
jvmTarget = JvmTarget.JVM_21
99+
}
107100
}
108101
compileOptions {
102+
encoding = "UTF-8"
103+
104+
// Flag to enable support for the new language APIs
105+
isCoreLibraryDesugaringEnabled = true
109106
sourceCompatibility = JavaVersion.VERSION_21
110107
targetCompatibility = JavaVersion.VERSION_21
111108
}

0 commit comments

Comments
 (0)