Skip to content

Commit 77ffd29

Browse files
authored
fix(android): android gradle plugin 8 compatibility
1 parent 83aaf5c commit 77ffd29

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

android/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ def safeExtGet(prop, fallback) {
55
}
66

77
android {
8+
9+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
10+
// Check AGP version for backward compatibility w/react-native versions still on gradle plugin 6
11+
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
12+
namespace "com.ianlin.RNCarrierInfo"
13+
}
14+
815
compileSdkVersion safeExtGet('compileSdkVersion', 28)
916

1017
defaultConfig {

0 commit comments

Comments
 (0)