Browse Source

version up for android tools and libs, sdk api

Oleksandr Kucherenko 6 years ago
parent
commit
7b13ab7082
1 changed files with 23 additions and 5 deletions
  1. 23
    5
      example/android/app/build.gradle

+ 23
- 5
example/android/app/build.gradle View File

@@ -65,6 +65,10 @@ import com.android.build.OutputFile
65 65
  * ]
66 66
  */
67 67
 
68
+if (!project.file("../../node_modules/react-native/react.gradle").exists()) {
69
+    throw new RuntimeException("React modules are not installed. execute: 'yarn install' in 'example' folder. ")
70
+}
71
+
68 72
 apply from: "../../node_modules/react-native/react.gradle"
69 73
 
70 74
 /**
@@ -83,15 +87,17 @@ def enableSeparateBuildPerCPUArchitecture = false
83 87
 def enableProguardInReleaseBuilds = false
84 88
 
85 89
 android {
86
-    compileSdkVersion 23
87
-    buildToolsVersion '25.0.3'
90
+    compileSdkVersion 27
91
+    buildToolsVersion '28.0.3'
88 92
 
89 93
     defaultConfig {
90 94
         applicationId "com.viewshotexample"
91 95
         minSdkVersion 16
92
-        targetSdkVersion 22
96
+        targetSdkVersion 27
97
+
93 98
         versionCode 1
94 99
         versionName "1.0"
100
+
95 101
         ndk {
96 102
             abiFilters "armeabi-v7a", "x86"
97 103
         }
@@ -115,7 +121,7 @@ android {
115 121
         variant.outputs.each { output ->
116 122
             // For each separate APK per architecture, set a unique version code as described here:
117 123
             // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
118
-            def versionCodes = ["armeabi-v7a":1, "x86":2]
124
+            def versionCodes = ["armeabi-v7a": 1, "x86": 2]
119 125
             def abi = output.getFilter(OutputFile.ABI)
120 126
             if (abi != null) {  // null for the universal-debug, universal-release variants
121 127
                 output.versionCodeOverride =
@@ -125,11 +131,23 @@ android {
125 131
     }
126 132
 }
127 133
 
134
+repositories {
135
+    google()
136
+    jcenter()
137
+    mavenLocal()
138
+    maven {
139
+        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
140
+        url "${project.projectDir}/../node_modules/react-native/android"
141
+    }
142
+}
143
+
128 144
 dependencies {
129 145
     compile project(':react-native-svg')
130 146
     compile fileTree(dir: "libs", include: ["*.jar"])
131
-    compile "com.android.support:appcompat-v7:23.0.1"
147
+
148
+    compile "com.android.support:appcompat-v7:27.+"
132 149
     compile "com.facebook.react:react-native:+"  // From node_modules
150
+
133 151
     compile project(':react-native-view-shot')
134 152
     compile project(':gl-react-native')
135 153
     compile project(':react-native-maps')