Skip to content

Commit 9beead5

Browse files
asutulaÁlvaro Medina Ballester
authored andcommitted
Use containing Android sdk and build tools version numbers (#45)
* Update build.gradle to read from containing project * Create index.d.ts * Remove new line for consistency with upstream
1 parent 93287e3 commit 9beead5

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

android/build.gradle

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11

22
apply plugin: 'com.android.library'
33

4-
def _ext = rootProject.ext
5-
6-
def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 23
7-
def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '23.0.1'
8-
def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 16
9-
def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 22
10-
4+
def DEFAULT_COMPILE_SDK_VERSION = 27
5+
def DEFAULT_BUILD_TOOLS_VERSION = "27.0.3"
6+
def DEFAULT_TARGET_SDK_VERSION = 27
117

128
android {
13-
compileSdkVersion _compileSdkVersion
14-
buildToolsVersion _buildToolsVersion
9+
compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
10+
buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
1511

1612
defaultConfig {
17-
minSdkVersion _minSdkVersion
18-
targetSdkVersion _targetSdkVersion
13+
minSdkVersion 16
14+
targetSdkVersion project.hasProperty('targetSdkVersion') ? project.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
1915
versionCode 1
2016
versionName "1.0"
2117
ndk {
@@ -30,4 +26,4 @@ android {
3026
dependencies {
3127
compile 'com.facebook.react:react-native:+'
3228
}
33-
29+

0 commit comments

Comments
 (0)