chore(android/gradle): add suport for AGP 8

This commit is contained in:
KrzysztofMoch 2023-09-25 12:24:08 +02:00
parent 842a156b3c
commit 01c8e54e12

View File

@ -70,9 +70,16 @@ android {
compileSdkVersion safeExtGet('compileSdkVersion', 31)
buildToolsVersion safeExtGet('buildToolsVersion', '30.0.2')
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
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
}
}
defaultConfig {
@ -87,6 +94,10 @@ android {
}
}
buildFeatures {
buildConfig true
}
packagingOptions {
exclude "**/libreact_render*.so"
}