Skip to content

Commit

Permalink
Update build.gradle for AGP 8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
fobos531 authored Jan 10, 2024
1 parent e18fb76 commit 50e7ed5
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@ afterEvaluate {
android {
compileSdkVersion safeExtGet("compileSdkVersion", 33)

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
if (agpVersion.tokenize('.')[0].toInteger() < 8) {
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.majorVersion
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}
}

defaultConfig {
Expand Down

0 comments on commit 50e7ed5

Please sign in to comment.