Skip to content

Commit

Permalink
feat(android): add support for AGP 8 (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiCalazans authored Sep 1, 2023
1 parent 65cc45a commit 5597b39
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/react-native-performance/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ android {
compileSdkVersion safeExtGet('compileSdkVersion', 31)
buildToolsVersion safeExtGet('buildToolsVersion', "31.0.0")

def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
if (agpVersion >= 7) {
namespace 'com.oblador.performance'
}

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 21)
targetSdkVersion safeExtGet('targetSdkVersion', 31)
Expand All @@ -73,9 +78,11 @@ android {
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
if (agpVersion < 8) {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
}

Expand Down

0 comments on commit 5597b39

Please sign in to comment.