@@ -75,7 +75,7 @@ import com.android.build.OutputFile
7575 */
7676
7777project. ext. react = [
78- entryFile : " index_old .js"
78+ entryFile : " index .js"
7979]
8080
8181apply from : " ../../node_modules/react-native/react.gradle"
@@ -102,26 +102,28 @@ bugly {
102102
103103android {
104104 compileSdkVersion rootProject. ext. compileSdkVersion
105- buildToolsVersion rootProject. ext. buildToolsVersion
105+
106+ compileOptions {
107+ sourceCompatibility JavaVersion . VERSION_1_8
108+ targetCompatibility JavaVersion . VERSION_1_8
109+ }
106110
107111 defaultConfig {
108112 applicationId " com.shitu"
109113 minSdkVersion rootProject. ext. minSdkVersion
110114 targetSdkVersion rootProject. ext. targetSdkVersion
111115 versionCode 1
112116 versionName " 1.0"
113- ndk {
114- abiFilters " armeabi-v7a" , " x86"
115- }
116117 }
117118 splits {
118119 abi {
119120 reset()
120121 enable enableSeparateBuildPerCPUArchitecture
121122 universalApk false // If true, also generate a universal APK
122- include " armeabi-v7a" , " x86"
123+ include " armeabi-v7a" , " x86" , " arm64-v8a " , " x86-64 "
123124 }
124125 }
126+
125127 signingConfigs {
126128 release {
127129 if (project. hasProperty(' MYAPP_RELEASE_STORE_FILE' )) {
@@ -130,8 +132,10 @@ android {
130132 keyAlias MYAPP_RELEASE_KEY_ALIAS
131133 keyPassword MYAPP_RELEASE_KEY_PASSWORD
132134 }
133- }
134- }
135+ }
136+ }
137+
138+
135139 buildTypes {
136140 release {
137141 minifyEnabled enableProguardInReleaseBuilds
@@ -144,56 +148,52 @@ android {
144148 if (variant. buildType. name != " debug" ) {
145149 variant. getPackageApplication(). outputDirectory = new File (project. rootDir. absolutePath + " /apk/release" )
146150 }
151+
147152 variant. outputs. each { output ->
148153 // For each separate APK per architecture, set a unique version code as described here:
149154 // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
150- def versionCodes = [" armeabi-v7a" :1 , " x86" :2 ]
155+ def versionCodes = [" armeabi-v7a" :1 , " x86" :2 , " arm64-v8a " : 3 , " x86-64 " : 4 ]
151156 def abi = output. getFilter(OutputFile . ABI )
152157 if (abi != null ) { // null for the universal-debug, universal-release variants
153158 output. versionCodeOverride =
154159 versionCodes. get(abi) * 1048576 + defaultConfig. versionCode
155160 }
156161 }
157162 }
158- android {
159- sourceSets {
160- main. jniLibs. srcDirs = [' libs' ]
161- }
162- lintOptions {
163- abortOnError false
164- }
165- }
166163 walle {
167- // 指定渠道包的输出路径
164+ // 指定渠道包的输出路径
168165 apkOutputFolder = new File (" ${ project.rootDir} /apk/channels" );
169- // 定制渠道包的APK的文件名称
170- // apkFileNameFormat = '${appName}-${packageName}-${channel}-${buildType}-v${versionName}-${versionCode}-${buildTime}.apk';
166+ // 定制渠道包的APK的文件名称
167+ // apkFileNameFormat = '${appName}-${packageName}-${channel}-${buildType}-v${versionName}-${versionCode}-${buildTime}.apk';
171168 apkFileNameFormat = ' ShiTu-${channel}-${buildType}-v${versionName}.apk' ;
172169 // 渠道配置文件
173170 channelFile = new File (" ${ project.getProjectDir()} /channel" )
174171 }
172+
175173}
176174
177175dependencies {
178- compile project(' :react-native-webview' )
179- compile project(' :react-native-measure-text ' )
180- compile project(' :react-native-spring-scrollview ' )
181- compile project(' :rn-fetch-blob ' )
182- compile project(' :react-native-vector-icons ' )
183- compile project(' :react-native-splash-screen ' )
184- compile project(' :react-native-linear-gradient' )
185- compile project(' :react-native-image-picker' )
186- compile project(' :react-native-gesture-handler' )
187- compile project(' :react-native-fast-image' )
176+ implementation project(' :react-native-webview' )
177+ implementation project(' :rn-fetch-blob ' )
178+ implementation project(' :react-native-vector-icons ' )
179+ implementation project(' :react-native-spring-scrollview ' )
180+ implementation project(' :react-native-splash-screen ' )
181+ implementation project(' :react-native-measure-text ' )
182+ implementation project(' :react-native-linear-gradient' )
183+ implementation project(' :react-native-image-picker' )
184+ implementation project(' :react-native-gesture-handler' )
185+ implementation project(' :react-native-fast-image' )
188186 implementation fileTree(dir : " libs" , include : [" *.jar" ])
189187 implementation " com.android.support:appcompat-v7:${ rootProject.ext.supportLibVersion} "
190188 implementation " com.facebook.react:react-native:+" // From node_modules
191189
192- compile ' com.tencent.bugly:crashreport:2.8.6.0'
193- compile ' com.tencent.bugly:nativecrashreport:3.6.0.1'
194- compile ' com.meituan.android.walle:library:1.1.6'
195- compile ' com.android.support:support-v4:27.1.1'
196- compile ' com.android.support:multidex:1.0.3'
190+ implementation ' com.tencent.bugly:crashreport:2.8.6.0'
191+ implementation ' com.tencent.bugly:nativecrashreport:3.6.0.1'
192+ implementation ' com.meituan.android.walle:library:1.1.6'
193+ implementation ' com.android.support:support-v4:27.1.1'
194+ implementation ' com.android.support:multidex:1.0.3'
195+
196+
197197}
198198
199199// Run this once to be able to run the application with BUCK
0 commit comments