Skip to content

Commit fe1b78d

Browse files
authored
fix(android): use Android Gradle Plugin 7.3.0 on 0.71+ (#1132)
See also facebook/react-native@9f6711f
1 parent cab917b commit fe1b78d

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

android/app/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ project.ext.react = [
7575
project.ext.signingConfigs = getSigningConfigs()
7676

7777
android {
78+
namespace "com.microsoft.reacttestapp"
79+
7880
compileSdkVersion project.ext.compileSdkVersion
7981

8082
if (project.hasProperty("ndkVersion")) {
@@ -202,7 +204,7 @@ android {
202204
dependsOn("preReleaseBuild")
203205
}
204206
}
205-
} else {
207+
} else if (reactNativeVersion < 7100) {
206208
// Due to a bug in AGP, we have to explicitly set a dependency
207209
// between configureCMakeDebug* tasks and the preBuild tasks. This can
208210
// be removed once this issue is resolved:

android/dependencies.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ ext {
1818
ndkVersion = "24.0.8215888"
1919
}
2020

21-
androidPluginVersion = "7.2.2"
21+
androidPluginVersion = getPackageVersionNumber("react-native", rootDir) < 7100
22+
? "7.2.2"
23+
: "7.3.0"
2224
kotlinVersion = rootProject.hasProperty("KOTLIN_VERSION")
2325
? rootProject.properties["KOTLIN_VERSION"]
2426
: "1.7.10"

android/support/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ repositories {
88
}
99

1010
android {
11+
namespace "com.microsoft.reacttestapp.support"
12+
1113
def androidDir = "${buildscript.sourceFile.getParent()}/../"
1214
apply(from: "${androidDir}/dependencies.gradle")
1315
apply(from: "${androidDir}/test-app-util.gradle")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest package="com.microsoft.reacttestapp.support" />
2+
<manifest />

0 commit comments

Comments
 (0)