Browse Source

updated android dependencies

Oleksandr Kucherenko 6 years ago
parent
commit
03cd53b3c6
1 changed files with 16 additions and 1 deletions
  1. 16
    1
      example/android/build.gradle

+ 16
- 1
example/android/build.gradle View File

2
 
2
 
3
 buildscript {
3
 buildscript {
4
     repositories {
4
     repositories {
5
+        google()
5
         jcenter()
6
         jcenter()
6
     }
7
     }
7
     dependencies {
8
     dependencies {
8
-        classpath 'com.android.tools.build:gradle:2.3.3'
9
+        classpath 'com.android.tools.build:gradle:3.1.4'
9
 
10
 
10
         // NOTE: Do not place your application dependencies here; they belong
11
         // NOTE: Do not place your application dependencies here; they belong
11
         // in the individual module build.gradle files
12
         // in the individual module build.gradle files
12
     }
13
     }
13
 }
14
 }
14
 
15
 
16
+// This will apply compileSdkVersion and buildToolsVersion to any android modules
17
+subprojects { subproject ->
18
+    afterEvaluate { project ->
19
+        if (!project.name.equalsIgnoreCase("app") && project.hasProperty("android")) {
20
+            android {
21
+                compileSdkVersion 27
22
+                buildToolsVersion '28.0.3'
23
+            }
24
+        }
25
+    }
26
+}
27
+
28
+
15
 allprojects {
29
 allprojects {
16
     repositories {
30
     repositories {
17
         mavenLocal()
31
         mavenLocal()
32
+        google()
18
         jcenter()
33
         jcenter()
19
         maven {
34
         maven {
20
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
35
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm