Browse Source

Merge pull request #34 from dulmandakh/android-tooling

try reuse Android tooling config from React Native + change compile to implementation
Thibault Malbranche 6 years ago
parent
commit
f1e3506121
No account linked to committer's email address
1 changed files with 10 additions and 5 deletions
  1. 10
    5
      android/build.gradle

+ 10
- 5
android/build.gradle View File

@@ -1,17 +1,22 @@
1 1
 apply plugin: 'com.android.library'
2 2
 
3
+def DEFAULT_COMPILE_SDK_VERSION             = 27
4
+def DEFAULT_BUILD_TOOLS_VERSION             = "27.0.3"
5
+def DEFAULT_MIN_SDK_VERSION                 = 16
6
+def DEFAULT_TARGET_SDK_VERSION              = 26
7
+
3 8
 android {
4
-    compileSdkVersion 26
5
-    buildToolsVersion '26.0.3'
9
+    compileSdkVersion rootProject.findProperty('compileSdkVersion') ?: DEFAULT_COMPILE_SDK_VERSION
10
+    buildToolsVersion rootProject.findProperty('buildToolsVersion') ?: DEFAULT_BUILD_TOOLS_VERSION
6 11
 
7 12
     defaultConfig {
8
-        minSdkVersion 16
9
-        targetSdkVersion 26
13
+        minSdkVersion rootProject.findProperty('minSdkVersion') ?: DEFAULT_MIN_SDK_VERSION
14
+        targetSdkVersion rootProject.findProperty('targetSdkVersion') ?: DEFAULT_TARGET_SDK_VERSION
10 15
         versionCode 1
11 16
         versionName "1.0"
12 17
     }
13 18
 }
14 19
 
15 20
 dependencies {
16
-    compile 'com.facebook.react:react-native:+'
21
+    implementation 'com.facebook.react:react-native:+'
17 22
 }