We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 707792b commit ce820e2Copy full SHA for ce820e2
1 file changed
android/build.gradle
@@ -22,7 +22,11 @@ allprojects {
22
}
23
24
apply plugin: "com.android.library"
25
-apply plugin: "kotlin-android"
+
26
+def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize(".")[0] as int
27
+if (agpMajor < 9) {
28
+ apply plugin: "kotlin-android"
29
+}
30
31
android {
32
if (project.android.hasProperty("namespace")) {
@@ -36,10 +40,6 @@ android {
36
40
targetCompatibility = JavaVersion.VERSION_1_8
37
41
38
42
39
- kotlinOptions {
- jvmTarget = JavaVersion.VERSION_1_8
- }
-
43
sourceSets {
44
main.java.srcDirs += "src/main/kotlin"
45
test.java.srcDirs += "src/test/kotlin"
@@ -68,3 +68,9 @@ android {
68
69
70
71
72
+kotlin {
73
+ compilerOptions {
74
+ jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
75
+ }
76
0 commit comments