提交 db1357b1 authored 作者: 吴强's avatar 吴强

Merge branch 'master' of ssh://192.168.1.116:29418/bolan-root/frontend/manager-app-sz into wq

# Conflicts: # android/.idea/gradle.xml # android/.idea/misc.xml # android/app/app.iml # android/local.properties
...@@ -99,6 +99,8 @@ def enableSeparateBuildPerCPUArchitecture = false ...@@ -99,6 +99,8 @@ def enableSeparateBuildPerCPUArchitecture = false
*/ */
def enableProguardInReleaseBuilds = false def enableProguardInReleaseBuilds = false
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
android { android {
compileSdkVersion 25 compileSdkVersion 25
buildToolsVersion "25.0.3" buildToolsVersion "25.0.3"
...@@ -114,6 +116,23 @@ android { ...@@ -114,6 +116,23 @@ android {
abiFilters "armeabi-v7a", "x86" abiFilters "armeabi-v7a", "x86"
} }
} }
productFlavors {
dev {
minSdkVersion 21
}
prod {
minSdkVersion 16
}
}
dexOptions {
javaMaxHeapSize "2G"
}
releaseStaging {
buildConfigField "String", "CODEPUSH_KEY", '"' + properties.getProperty("code_push.key_staging") + '"'
}
release {
buildConfigField "String", "CODEPUSH_KEY", '"' + properties.getProperty("code_push.key_production") + '"'
}
signingConfigs { signingConfigs {
release { release {
storeFile file("app.jks") storeFile file("app.jks")
......
D4OD3'd9
\ No newline at end of file
...@@ -37,7 +37,7 @@ public class MainApplication extends Application implements ReactApplication { ...@@ -37,7 +37,7 @@ public class MainApplication extends Application implements ReactApplication {
protected List<ReactPackage> getPackages() { protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList( return Arrays.<ReactPackage>asList(
new MainReactPackage(), new MainReactPackage(),
new CodePush(null, getApplicationContext(), BuildConfig.DEBUG), new CodePush(BuildConfig.CODEPUSH_KEY, getApplicationContext(), BuildConfig.DEBUG),
new RNDeviceInfo(), new RNDeviceInfo(),
new IDCardReactPackage(), new IDCardReactPackage(),
new VectorIconsPackage(), new VectorIconsPackage(),
......
...@@ -18,4 +18,6 @@ ...@@ -18,4 +18,6 @@
# org.gradle.parallel=true # org.gradle.parallel=true
android.useDeprecatedNdk=true android.useDeprecatedNdk=true
org.gradle.jvmargs=-Xmx4G org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx3G
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
# Location of the SDK. This is only used by Gradle. # Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the # For customization when using a Version Control System, please read the
# header note. # header note.
#Fri Oct 27 18:29:04 CST 2017 #Wed Sep 27 15:26:11 CST 2017
#sdk.dir=D\:\\AppData\\Local\\Android\\sdk1 code_push.key_production=1jJDUki8dREADfZnMQWgjrk02K1Q4ksvOXqog
sdk.dir=D\:\\Android\\sdk code_push.key_staging=09Bbn7Y3d8WBtouy9x5JxTjVvZgI4ksvOXqog
sdk.dir=D\:\\Android\\sdk
...@@ -2,6 +2,7 @@ import React, { PureComponent } from 'react'; ...@@ -2,6 +2,7 @@ import React, { PureComponent } from 'react';
import { BackHandler, Animated, Easing } from 'react-native'; import { BackHandler, Animated, Easing } from 'react-native';
import { StackNavigator, addNavigationHelpers, NavigationActions } from 'react-navigation'; import { StackNavigator, addNavigationHelpers, NavigationActions } from 'react-navigation';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import codePush from 'react-native-code-push';
import NavigatorService from './services/navigator'; import NavigatorService from './services/navigator';
import Welcome from './routes/welcome'; import Welcome from './routes/welcome';
import Error from './routes/error'; import Error from './routes/error';
...@@ -66,6 +67,11 @@ class Router extends PureComponent { ...@@ -66,6 +67,11 @@ class Router extends PureComponent {
BackHandler.addEventListener('hardwareBackPress', this.backHandle); BackHandler.addEventListener('hardwareBackPress', this.backHandle);
} }
componentDidMount() {
codePush.sync();
}
componentWillUnmount() { componentWillUnmount() {
BackHandler.removeEventListener('hardwareBackPress', this.backHandle); BackHandler.removeEventListener('hardwareBackPress', this.backHandle);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论