Skip to content

Commit c9e090b

Browse files
authored
Merge pull request #328 from Shhzdmrz/master
Update to android/build.gradle
2 parents 1d1f065 + d3f6fe3 commit c9e090b

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

android/build.gradle

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
apply plugin: 'com.android.library'
22

3+
def DEFAULT_COMPILE_SDK_VERSION = 26
4+
def DEFAULT_BUILD_TOOLS_VERSION = "26.0.2"
5+
def DEFAULT_TARGET_SDK_VERSION = 26
6+
def DEFAULT_SUPPORT_LIB_VERSION = "26.1.0"
7+
38
android {
4-
compileSdkVersion 26
5-
buildToolsVersion "26.0.3"
9+
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
10+
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
611

712
defaultConfig {
813
minSdkVersion 16
9-
targetSdkVersion 26
14+
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
1015
versionCode 1
1116
versionName "1.0"
1217
}
@@ -19,8 +24,10 @@ android {
1924
}
2025

2126
dependencies {
22-
compile fileTree(dir: 'libs', include: ['*.jar'])
23-
testCompile 'junit:junit:4.12'
24-
compile 'com.android.support:appcompat-v7:26.1.0'
25-
compile "com.facebook.react:react-native:+" // From node_modules
27+
def supportLibVersion = rootProject.hasProperty('supportLibVersion') ? rootProject.supportLibVersion : DEFAULT_SUPPORT_LIB_VERSION
28+
29+
implementation fileTree(dir: 'libs', include: ['*.jar'])
30+
testImplementation 'junit:junit:4.12'
31+
implementation "com.android.support:appcompat-v7:$supportLibVersion"
32+
implementation "com.facebook.react:react-native:+" // From node_modules
2633
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"url": "https://github.com/crazycodeboy/react-native-splash-screen/issues"
2929
},
3030
"peerDependencies": {
31-
"react-native": ">=0.47.0"
31+
"react-native": ">=0.57.0"
3232
},
3333
"homepage": "https://github.com/crazycodeboy/react-native-splash-screen#readme"
3434
}

0 commit comments

Comments
 (0)