Skip to content

Commit 35e47d5

Browse files
committed
Update to android/build.gradle
Related to issue #327 WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
1 parent 1d1f065 commit 35e47d5

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

android/build.gradle

+15-8
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
26-
}
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+
compileOnly "com.facebook.react:react-native:+" // From node_modules
33+
}

package.json

+1-1
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)