Skip to content

Commit 814b8ee

Browse files
authored
fix(android): set project.ext.minSdkVersion for community modules (#597)
1 parent 385eb99 commit 814b8ee

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ project.ext.react = [
5959
]
6060

6161
android {
62-
compileSdkVersion sdk.version
63-
buildToolsVersion sdk.buildToolsVersion
62+
compileSdkVersion project.ext.compileSdkVersion
63+
buildToolsVersion project.ext.buildToolsVersion
6464

6565
// We need only set `ndkVersion` when building react-native from source.
6666
if (hasProperty("ANDROID_NDK_VERSION")) {
@@ -81,8 +81,8 @@ android {
8181

8282
defaultConfig {
8383
applicationId project.ext.react.applicationId
84-
minSdkVersion sdk.minVersion
85-
targetSdkVersion sdk.version
84+
minSdkVersion project.ext.minSdkVersion
85+
targetSdkVersion project.ext.targetSdkVersion
8686
versionCode reactTestApp.versionCode
8787
versionName reactTestApp.versionName
8888

android/dependencies.gradle

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ ext {
88
versionName: "1.0"
99
]
1010

11-
sdk = [
12-
version : 29,
13-
minVersion : 21,
14-
buildToolsVersion: "30.0.3"
15-
]
11+
compileSdkVersion = 29
12+
buildToolsVersion = "30.0.3"
13+
minSdkVersion = 21
14+
targetSdkVersion = 29
1615

1716
/**
1817
* Dependabot requires a `dependencies.gradle` to evaluate Java

android/support/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ apply from: "$androidDir/force-resolve-trove4j.gradle"
1414
apply plugin: "com.android.library"
1515

1616
android {
17-
compileSdkVersion sdk.version
18-
buildToolsVersion sdk.buildToolsVersion
17+
compileSdkVersion project.ext.compileSdkVersion
18+
buildToolsVersion project.ext.buildToolsVersion
1919

2020
defaultConfig {
21-
minSdkVersion sdk.minVersion
22-
targetSdkVersion sdk.version
21+
minSdkVersion project.ext.minSdkVersion
22+
targetSdkVersion project.ext.targetSdkVersion
2323
versionCode reactTestApp.versionCode
2424
versionName reactTestApp.versionName
2525
}

0 commit comments

Comments
 (0)