|
@@ -3,7 +3,7 @@ apply plugin: 'com.google.gms.google-services'
|
|
|
|
|
|
|
|
import com.android.build.OutputFile
|
|
import com.android.build.OutputFile
|
|
|
|
|
|
|
|
-def myVersionName = "2.0.0" //★★★★★版本号★★★★★
|
|
|
|
|
|
|
+def myVersionName = "2.1.0" //★★★★★版本号★★★★★
|
|
|
/**
|
|
/**
|
|
|
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
|
|
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
|
|
|
* and bundleReleaseJsAndAssets).
|
|
* and bundleReleaseJsAndAssets).
|
|
@@ -85,6 +85,7 @@ project.ext.react = [
|
|
|
|
|
|
|
|
apply from: "../../node_modules/react-native/react.gradle"
|
|
apply from: "../../node_modules/react-native/react.gradle"
|
|
|
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
|
|
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
|
|
|
|
|
+apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Set this to true to create two separate APKs instead of one:
|
|
* Set this to true to create two separate APKs instead of one:
|
|
@@ -186,6 +187,19 @@ android {
|
|
|
buildTypes {
|
|
buildTypes {
|
|
|
debug {
|
|
debug {
|
|
|
signingConfig signingConfigs.debug
|
|
signingConfig signingConfigs.debug
|
|
|
|
|
+ //热更新应用分发Staging key
|
|
|
|
|
+ resValue "string", "CodePushDeploymentKey", "zu0zkOWpBhXTGQ83pC15FW3puB--tuSG5TvIQ"
|
|
|
|
|
+ }
|
|
|
|
|
+ releaseStaging {
|
|
|
|
|
+ signingConfig signingConfigs.release
|
|
|
|
|
+ minifyEnabled enableProguardInReleaseBuilds
|
|
|
|
|
+ proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
|
|
|
+ ndk {
|
|
|
|
|
+ abiFilters "armeabi", "armeabi-v7a", "arm64-v8a"
|
|
|
|
|
+ }
|
|
|
|
|
+ //热更新应用分发Staging key
|
|
|
|
|
+ resValue "string", "CodePushDeploymentKey", "zu0zkOWpBhXTGQ83pC15FW3puB--tuSG5TvIQ"
|
|
|
|
|
+ matchingFallbacks = ['release']
|
|
|
}
|
|
}
|
|
|
release {
|
|
release {
|
|
|
// Caution! In production, you need to generate your own keystore file.
|
|
// Caution! In production, you need to generate your own keystore file.
|
|
@@ -196,6 +210,8 @@ android {
|
|
|
ndk {
|
|
ndk {
|
|
|
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a"
|
|
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a"
|
|
|
}
|
|
}
|
|
|
|
|
+ //热更新应用分发Production key
|
|
|
|
|
+ resValue "string", "CodePushDeploymentKey", "rQGN1c2GXKx5EBT1scXipC9xwSQZMG62xiWOd"
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|