diff --git a/android/build.gradle b/android/build.gradle index bdfb96053..121aaac24 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -66,15 +66,18 @@ afterEvaluate { } android { - compileSdkVersion safeExtGet("compileSdkVersion", 31) + compileSdkVersion safeExtGet("compileSdkVersion", 34) - 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_17 + targetCompatibility JavaVersion.VERSION_17 + } - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.majorVersion + kotlinOptions { + jvmTarget = JavaVersion.VERSION_17.majorVersion + } } defaultConfig {