소스 검색

version up for android tools and libs, sdk api

Oleksandr Kucherenko 6 년 전
부모
커밋
7b13ab7082
1개의 변경된 파일23개의 추가작업 그리고 5개의 파일을 삭제
  1. 23
    5
      example/android/app/build.gradle

+ 23
- 5
example/android/app/build.gradle 파일 보기

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
 apply from: "../../node_modules/react-native/react.gradle"
72
 apply from: "../../node_modules/react-native/react.gradle"
69
 
73
 
70
 /**
74
 /**
83
 def enableProguardInReleaseBuilds = false
87
 def enableProguardInReleaseBuilds = false
84
 
88
 
85
 android {
89
 android {
86
-    compileSdkVersion 23
87
-    buildToolsVersion '25.0.3'
90
+    compileSdkVersion 27
91
+    buildToolsVersion '28.0.3'
88
 
92
 
89
     defaultConfig {
93
     defaultConfig {
90
         applicationId "com.viewshotexample"
94
         applicationId "com.viewshotexample"
91
         minSdkVersion 16
95
         minSdkVersion 16
92
-        targetSdkVersion 22
96
+        targetSdkVersion 27
97
+
93
         versionCode 1
98
         versionCode 1
94
         versionName "1.0"
99
         versionName "1.0"
100
+
95
         ndk {
101
         ndk {
96
             abiFilters "armeabi-v7a", "x86"
102
             abiFilters "armeabi-v7a", "x86"
97
         }
103
         }
115
         variant.outputs.each { output ->
121
         variant.outputs.each { output ->
116
             // For each separate APK per architecture, set a unique version code as described here:
122
             // For each separate APK per architecture, set a unique version code as described here:
117
             // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
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
             def abi = output.getFilter(OutputFile.ABI)
125
             def abi = output.getFilter(OutputFile.ABI)
120
             if (abi != null) {  // null for the universal-debug, universal-release variants
126
             if (abi != null) {  // null for the universal-debug, universal-release variants
121
                 output.versionCodeOverride =
127
                 output.versionCodeOverride =
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
 dependencies {
144
 dependencies {
129
     compile project(':react-native-svg')
145
     compile project(':react-native-svg')
130
     compile fileTree(dir: "libs", include: ["*.jar"])
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
     compile "com.facebook.react:react-native:+"  // From node_modules
149
     compile "com.facebook.react:react-native:+"  // From node_modules
150
+
133
     compile project(':react-native-view-shot')
151
     compile project(':react-native-view-shot')
134
     compile project(':gl-react-native')
152
     compile project(':gl-react-native')
135
     compile project(':react-native-maps')
153
     compile project(':react-native-maps')