Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ rootProject.allprojects {
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
// AGP 9 with built-in Kotlin registers the `kotlin` extension itself; applying kotlin-android on top fails.
if (project.extensions.findByName('kotlin') == null) {
apply plugin: 'kotlin-android'
}

android {
namespace "net.zonble.flutter_platform_alert"
Expand All @@ -36,10 +39,6 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
Expand All @@ -50,6 +49,12 @@ android {
}
}

kotlin {
compilerOptions {
Comment thread
ch-jerry marked this conversation as resolved.
Resolved
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}