Skip to content

Commit 7320969

Browse files
authored
Merge pull request #20 from mikehardy/patch-1
fix(android): android gradle plugin 8 compatibility
2 parents 83aaf5c + 77ffd29 commit 7320969

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)