提交 a9b64acd authored 作者: vipcxj's avatar vipcxj

add: 热更新支持

上级 95015694
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
</facet> </facet>
<facet type="android" name="Android"> <facet type="android" name="Android">
<configuration> <configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" /> <option name="SELECTED_BUILD_VARIANT" value="devDebug" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /> <option name="ASSEMBLE_TASK_NAME" value="assembleDevDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" /> <option name="COMPILE_JAVA_TASK_NAME" value="compileDevDebugSources" />
<afterSyncTasks> <afterSyncTasks>
<task>generateDebugSources</task> <task>generateDevDebugSources</task>
</afterSyncTasks> </afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" /> <option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" /> <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
...@@ -22,25 +22,60 @@ ...@@ -22,25 +22,60 @@
</configuration> </configuration>
</facet> </facet>
</component> </component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false"> <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" /> <output url="file://$MODULE_DIR$/build/intermediates/classes/dev/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" /> <output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/dev/debug" />
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/dev/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/dev/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/dev/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/dev/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/dev/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/dev/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/dev/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/src/devDebug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/src/devDebug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/src/devDebug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/src/devDebug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/src/devDebug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/devDebug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/devDebug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/dev/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/dev/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/dev/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/dev/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/dev/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/dev/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/dev/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/dev/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/dev/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/dev/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/dev/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/dev/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/dev/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/dev/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDev/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDev/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDev/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDev/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDev/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDev/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDev/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDev/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDev/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDev/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDev/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDev/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDev/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDev/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
...@@ -81,6 +116,7 @@ ...@@ -81,6 +116,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/multi-dex" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/multi-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
...@@ -94,43 +130,54 @@ ...@@ -94,43 +130,54 @@
</content> </content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" /> <orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="gson-2.2.4" level="project" /> <orderEntry type="library" exported="" name="com.google.android.gms:play-services-tasks-license-11.6.0" level="project" />
<orderEntry type="library" exported="" name="imagepipeline-base-1.0.1" level="project" /> <orderEntry type="library" exported="" name="com.android.support:multidex-1.0.1" level="project" />
<orderEntry type="library" exported="" name="textlayoutbuilder-1.0.0" level="project" /> <orderEntry type="library" exported="" name="com.facebook.fresco:imagepipeline-okhttp3-1.3.0" level="project" />
<orderEntry type="library" exported="" name="classes" level="project" /> <orderEntry type="library" exported="" name="__local_jars__:/Users/yaohx_169/Develop/Project/React-Native/AwesomeProject/android/app/libs/HSProtAPI.jar:unspecified@jar" level="project" />
<orderEntry type="library" exported="" name="jsr305-3.0.0" level="project" /> <orderEntry type="library" exported="" name="com.google.android.gms:play-services-gcm-license-11.6.0" level="project" />
<orderEntry type="library" exported="" name="bolts-tasks-1.4.0" level="project" /> <orderEntry type="library" exported="" name="__local_jars__:/Users/yaohx_169/Develop/Project/React-Native/AwesomeProject/android/app/libs/gson-2.2.4-sources.jar:unspecified@jar" level="project" />
<orderEntry type="library" exported="" name="support-core-ui-25.3.1" level="project" /> <orderEntry type="library" exported="" name="com.google.android.gms:play-services-base-license-11.6.0" level="project" />
<orderEntry type="library" exported="" name="drawee-1.0.1" level="project" /> <orderEntry type="library" exported="" name="javax.inject:javax.inject:1@jar" level="project" />
<orderEntry type="library" exported="" name="fbcore-1.0.1" level="project" /> <orderEntry type="library" exported="" name="com.android.support:support-core-ui-25.4.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-urlconnection-3.6.0" level="project" /> <orderEntry type="library" exported="" name="__local_jars__:/Users/yaohx_169/Develop/Project/React-Native/AwesomeProject/android/app/libs/jxl.jar:unspecified@jar" level="project" />
<orderEntry type="library" exported="" name="android-jsc-r174650" level="project" /> <orderEntry type="library" exported="" name="com.facebook.fresco:imagepipeline-base-1.3.0" level="project" />
<orderEntry type="library" exported="" name="ksoap2-android-assembly-3.0.0-jar-with-dependencies" level="project" /> <orderEntry type="library" exported="" name="com.android.support:support-compat-25.4.0" level="project" />
<orderEntry type="library" exported="" name="staticlayout-proxy-1.0" level="project" /> <orderEntry type="library" exported="" name="com.parse.bolts:bolts-tasks:1.4.0@jar" level="project" />
<orderEntry type="library" exported="" name="imagepipeline-okhttp3-1.0.1" level="project" /> <orderEntry type="library" exported="" name="com.google.android.gms:play-services-basement-license-11.6.0" level="project" />
<orderEntry type="library" exported="" name="support-core-utils-25.3.1" level="project" /> <orderEntry type="library" exported="" name="com.squareup.okhttp3:okhttp-urlconnection:3.6.0@jar" level="project" />
<orderEntry type="library" exported="" name="support-fragment-25.3.1" level="project" /> <orderEntry type="library" exported="" name="com.google.code.findbugs:jsr305:3.0.0@jar" level="project" />
<orderEntry type="library" exported="" name="fresco-1.0.1" level="project" /> <orderEntry type="library" exported="" name="com.google.android.gms:play-services-basement-11.6.0" level="project" />
<orderEntry type="library" exported="" name="jxl" level="project" /> <orderEntry type="library" exported="" name="com.google.android.gms:play-services-iid-11.6.0" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="multidex-instrumentation-1.0.1" level="project" /> <orderEntry type="library" exported="" name="com.android.support:support-annotations:25.4.0@jar" level="project" />
<orderEntry type="library" exported="" name="gson-2.2.4-javadoc" level="project" /> <orderEntry type="library" exported="" name="com.facebook.soloader:soloader-0.1.0" level="project" />
<orderEntry type="library" exported="" name="HSProtAPI" level="project" /> <orderEntry type="library" exported="" name="com.android.support:support-core-utils-25.4.0" level="project" />
<orderEntry type="library" exported="" name="okio-1.13.0" level="project" /> <orderEntry type="library" exported="" name="com.squareup.okio:okio:1.13.0@jar" level="project" />
<orderEntry type="library" exported="" name="imagepipeline-1.0.1" level="project" /> <orderEntry type="library" exported="" name="com.android.support:support-v4-25.4.0" level="project" />
<orderEntry type="library" exported="" name="soloader-0.1.0" level="project" /> <orderEntry type="library" exported="" name="__local_jars__:/Users/yaohx_169/Develop/Project/React-Native/AwesomeProject/android/app/libs/gson-2.2.4.jar:unspecified@jar" level="project" />
<orderEntry type="library" exported="" name="javax.inject-1" level="project" /> <orderEntry type="library" exported="" name="com.android.support:support-fragment-25.4.0" level="project" />
<orderEntry type="library" exported="" name="AraBMApiDev" level="project" /> <orderEntry type="library" exported="" name="com.facebook.fresco:fresco-1.3.0" level="project" />
<orderEntry type="library" exported="" name="react-native-0.47.2" level="project" /> <orderEntry type="library" exported="" name="com.android.support:support-media-compat-25.4.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-3.6.0" level="project" /> <orderEntry type="library" exported="" name="com.facebook.react:react-native-0.49.5" level="project" />
<orderEntry type="library" exported="" name="AraBMApiFp" level="project" /> <orderEntry type="library" exported="" name="com.google.android.gms:play-services-iid-license-11.6.0" level="project" />
<orderEntry type="library" exported="" name="multidex-1.0.1" level="project" /> <orderEntry type="library" exported="" name="__local_jars__:/Users/yaohx_169/Develop/Project/React-Native/AwesomeProject/android/app/libs/AraBMApiDev.jar:unspecified@jar" level="project" />
<orderEntry type="library" exported="" name="support-v4-25.3.1" level="project" /> <orderEntry type="library" exported="" name="com.facebook.fresco:imagepipeline-1.3.0" level="project" />
<orderEntry type="library" exported="" name="support-media-compat-25.3.1" level="project" /> <orderEntry type="library" exported="" name="com.android.support:animated-vector-drawable-25.4.0" level="project" />
<orderEntry type="library" exported="" name="gson-2.2.4-sources" level="project" /> <orderEntry type="library" exported="" name="com.squareup.okhttp3:okhttp:3.6.0@jar" level="project" />
<orderEntry type="library" exported="" name="support-annotations-25.3.1" level="project" /> <orderEntry type="library" exported="" name="com.facebook.fresco:fbcore-1.3.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-25.3.1" level="project" /> <orderEntry type="library" exported="" name="com.facebook.fresco:drawee-1.3.0" level="project" />
<orderEntry type="library" exported="" name="support-vector-drawable-25.3.1" level="project" /> <orderEntry type="library" exported="" name="com.google.android.gms:play-services-tasks-11.6.0" level="project" />
<orderEntry type="library" exported="" name="support-compat-25.3.1" level="project" /> <orderEntry type="library" exported="" name="com.facebook.fbui.textlayoutbuilder:staticlayout-proxy:1.0@jar" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-25.3.1" level="project" /> <orderEntry type="library" exported="" name="com.android.support:appcompat-v7-25.4.0" level="project" />
<orderEntry type="library" exported="" name="__local_jars__:/Users/yaohx_169/Develop/Project/React-Native/AwesomeProject/android/app/libs/AraBMApiFp.jar:unspecified@jar" level="project" />
<orderEntry type="library" exported="" name="com.google.android.gms:play-services-gcm-11.6.0" level="project" />
<orderEntry type="library" exported="" name="__local_jars__:/Users/yaohx_169/Develop/Project/React-Native/AwesomeProject/android/app/libs/classes.jar:unspecified@jar" level="project" />
<orderEntry type="library" exported="" name="com.google.android.gms:play-services-base-11.6.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-vector-drawable-25.4.0" level="project" />
<orderEntry type="library" exported="" name="__local_jars__:/Users/yaohx_169/Develop/Project/React-Native/AwesomeProject/android/app/libs/gson-2.2.4-javadoc.jar:unspecified@jar" level="project" />
<orderEntry type="library" exported="" name="com.facebook.fbui.textlayoutbuilder:textlayoutbuilder-1.0.0" level="project" />
<orderEntry type="library" exported="" name="__local_jars__:/Users/yaohx_169/Develop/Project/React-Native/AwesomeProject/android/app/libs/ksoap2-android-assembly-3.0.0-jar-with-dependencies.jar:unspecified@jar" level="project" />
<orderEntry type="library" exported="" name="org.webkit:android-jsc-r174650" level="project" />
<orderEntry type="module" module-name="react-native-device-info" exported="" />
<orderEntry type="module" module-name="react-native-code-push" exported="" />
</component> </component>
</module> </module>
\ No newline at end of file
...@@ -94,6 +94,8 @@ def enableSeparateBuildPerCPUArchitecture = false ...@@ -94,6 +94,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"
...@@ -109,6 +111,23 @@ android { ...@@ -109,6 +111,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")
......
!function(e){e.__DEV__=!1,e.__BUNDLE_START_TIME__=e.nativePerformanceNow?e.nativePerformanceNow():Date.now()}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(r){"use strict";function e(r,e,t){e in u||(u[e]={dependencyMap:t,exports:void 0,factory:r,hasError:!1,isInitialized:!1})}function t(r){var e=r,t=u[e];return t&&t.isInitialized?t.exports:n(e,t)}function n(e,t){if(!c&&r.ErrorUtils){c=!0;var n=void 0;try{n=i(e,t)}catch(e){r.ErrorUtils.reportFatalError(e)}return c=!1,n}return i(e,t)}function i(e,n){var i=r.nativeRequire;if(!n&&i&&(i(e),n=u[e]),!n)throw o(e);if(n.hasError)throw a(e,n.error);n.isInitialized=!0;var c=n.exports={},s=n,d=s.factory,f=s.dependencyMap;try{var l={exports:c};return d(r,t,l,c,f),n.factory=void 0,n.dependencyMap=void 0,n.exports=l.exports}catch(r){throw n.hasError=!0,n.error=r,n.isInitialized=!1,n.exports=void 0,r}}function o(r){var e='Requiring unknown module "'+r+'".';return Error(e)}function a(r,e){var t=r;return Error('Requiring module "'+t+'", which threw an exception: '+e)}r.require=t,r.__d=e;var u=Object.create(null);t.async=function(r){return Promise.resolve().then(function(){return t(r)})};var c=!1}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(n){Object.assign=function(n,e){for(var f=1;f<arguments.length;f++){var l=arguments[f];if(null!=l)for(var i in l)n[i]=l[i]}return n}}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(n){function r(r){return function(){var e=void 0;e=1===arguments.length&&"string"==typeof arguments[0]?arguments[0]:Array.prototype.map.call(arguments,function(n){return i(n,{depth:10})}).join(", ");var t=r;"Warning: "===e.slice(0,9)&&t>=u.error&&(t=u.warn),n.__inspectorLog&&n.__inspectorLog(a[t],e,[].slice.call(arguments),l),n.nativeLoggingHook(e,t)}}function e(n,r){return Array.apply(null,Array(r)).map(function(){return n})}function t(r){function t(n,r){var t=n.map(function(n,r){var t=e(" ",p[r]-n.length).join("");return n+t});return r=r||" ",t.join(r+"|"+r)}if(!Array.isArray(r)){var i=r;r=[];for(var a in i)if(i.hasOwnProperty(a)){var l=i[a];l[o]=a,r.push(l)}}if(0===r.length)return void n.nativeLoggingHook("",u.info);var c=Object.keys(r[0]).sort(),f=[],p=[];c.forEach(function(n,e){p[e]=n.length;for(var t=0;t<r.length;t++){var i=(r[t][n]||"?").toString();f[t]=f[t]||[],f[t][e]=i,p[e]=Math.max(p[e],i.length)}});for(var s=p.map(function(n){return e("-",n).join("")}),g=t(s,"-"),y=t(c),v=[y,g],h=0;h<r.length;h++)v.push(t(f[h]));n.nativeLoggingHook("\n"+v.join("\n"),u.info)}var i=function(){function n(n,e){var i={seen:[],stylize:r};return t(i,n,e.depth)}function r(n,r){return n}function e(n){var r={};return n.forEach(function(n,e){r[n]=!0}),r}function t(n,r,t){var f=i(n,r);if(f)return f;var p=Object.keys(r),s=e(p);if(b(r)&&(p.indexOf("message")>=0||p.indexOf("description")>=0))return o(r);if(0===p.length){if(m(r)){var g=r.name?": "+r.name:"";return n.stylize("[Function"+g+"]","special")}if(v(r))return n.stylize(RegExp.prototype.toString.call(r),"regexp");if(d(r))return n.stylize(Date.prototype.toString.call(r),"date");if(b(r))return o(r)}var y="",h=!1,j=["{","}"];if(c(r)&&(h=!0,j=["[","]"]),m(r)){var z=r.name?": "+r.name:"";y=" [Function"+z+"]"}if(v(r)&&(y=" "+RegExp.prototype.toString.call(r)),d(r)&&(y=" "+Date.prototype.toUTCString.call(r)),b(r)&&(y=" "+o(r)),0===p.length&&(!h||0==r.length))return j[0]+y+j[1];if(t<0)return v(r)?n.stylize(RegExp.prototype.toString.call(r),"regexp"):n.stylize("[Object]","special");n.seen.push(r);var O;return O=h?u(n,r,t,s,p):p.map(function(e){return a(n,r,t,s,e,h)}),n.seen.pop(),l(O,y,j)}function i(n,r){if(y(r))return n.stylize("undefined","undefined");if(g(r)){var e="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return n.stylize(e,"string")}return s(r)?n.stylize(""+r,"number"):f(r)?n.stylize(""+r,"boolean"):p(r)?n.stylize("null","null"):void 0}function o(n){return"["+Error.prototype.toString.call(n)+"]"}function u(n,r,e,t,i){for(var o=[],u=0,l=r.length;u<l;++u)z(r,String(u))?o.push(a(n,r,e,t,String(u),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(a(n,r,e,t,i,!0))}),o}function a(n,r,e,i,o,u){var a,l,c;if(c=Object.getOwnPropertyDescriptor(r,o)||{value:r[o]},c.get?l=c.set?n.stylize("[Getter/Setter]","special"):n.stylize("[Getter]","special"):c.set&&(l=n.stylize("[Setter]","special")),z(i,o)||(a="["+o+"]"),l||(n.seen.indexOf(c.value)<0?(l=p(e)?t(n,c.value,null):t(n,c.value,e-1),l.indexOf("\n")>-1&&(l=u?l.split("\n").map(function(n){return" "+n}).join("\n").substr(2):"\n"+l.split("\n").map(function(n){return" "+n}).join("\n"))):l=n.stylize("[Circular]","special")),y(a)){if(u&&o.match(/^\d+$/))return l;a=JSON.stringify(""+o),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=n.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=n.stylize(a,"string"))}return a+": "+l}function l(n,r,e){var t=0,i=n.reduce(function(n,r){return t++,r.indexOf("\n")>=0&&t++,n+r.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?e[0]+(""===r?"":r+"\n ")+" "+n.join(",\n ")+" "+e[1]:e[0]+r+" "+n.join(", ")+" "+e[1]}function c(n){return Array.isArray(n)}function f(n){return"boolean"==typeof n}function p(n){return null===n}function s(n){return"number"==typeof n}function g(n){return"string"==typeof n}function y(n){return void 0===n}function v(n){return h(n)&&"[object RegExp]"===j(n)}function h(n){return"object"==typeof n&&null!==n}function d(n){return h(n)&&"[object Date]"===j(n)}function b(n){return h(n)&&("[object Error]"===j(n)||n instanceof Error)}function m(n){return"function"==typeof n}function j(n){return Object.prototype.toString.call(n)}function z(n,r){return Object.prototype.hasOwnProperty.call(n,r)}return n}(),o="(index)",u={trace:0,info:1,warn:2,error:3},a=[];a[u.trace]="debug",a[u.info]="log",a[u.warn]="warning",a[u.error]="error";var l=1;if(n.nativeLoggingHook){n.console;n.console={error:r(u.error),info:r(u.info),log:r(u.info),warn:r(u.warn),trace:r(u.trace),debug:r(u.trace),table:t}}else if(!n.console){var c=n.print||function(){};n.console={error:c,info:c,log:c,warn:c,trace:c,debug:c,table:c}}}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(r){var n=0,t=function(r){throw r},u={setGlobalHandler:function(r){t=r},getGlobalHandler:function(){return t},reportError:function(r){t&&t(r)},reportFatalError:function(r){t&&t(r,!0)},applyWithGuard:function(r,t,e){try{return n++,r.apply(t,e)}catch(r){u.reportError(r)}finally{n--}return null},applyWithGuardIfNeeded:function(r,n,t){return u.inGuard()?r.apply(n,t):(u.applyWithGuard(r,n,t),null)},inGuard:function(){return n},guard:function(r,n,t){function e(){return u.applyWithGuard(r,t||this,arguments,null,n)}return"function"!=typeof r?(console.warn("A function must be passed to ErrorUtils.guard, got ",r),null):(n=n||r.name||"<generated guard>",e)}};r.ErrorUtils=u}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(e){if(void 0===Number.EPSILON&&Object.defineProperty(Number,"EPSILON",{value:Math.pow(2,-52)}),void 0===Number.MAX_SAFE_INTEGER&&Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:Math.pow(2,53)-1}),void 0===Number.MIN_SAFE_INTEGER&&Object.defineProperty(Number,"MIN_SAFE_INTEGER",{value:-(Math.pow(2,53)-1)}),!Number.isNaN){var r=e.isNaN;Object.defineProperty(Number,"isNaN",{configurable:!0,enumerable:!1,value:function(e){return"number"==typeof e&&r(e)},writable:!0})}}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(t){String.prototype.startsWith||(String.prototype.startsWith=function(t){"use strict";if(null==this)throw TypeError();var r=String(this),e=arguments.length>1?Number(arguments[1])||0:0,n=Math.min(Math.max(e,0),r.length);return r.indexOf(String(t),e)===n}),String.prototype.endsWith||(String.prototype.endsWith=function(t){"use strict";if(null==this)throw TypeError();var r=String(this),e=r.length,n=String(t),i=arguments.length>1?Number(arguments[1])||0:e,o=Math.min(Math.max(i,0),e),h=o-n.length;return!(h<0)&&r.lastIndexOf(n,h)===h}),String.prototype.repeat||(String.prototype.repeat=function(t){"use strict";if(null==this)throw TypeError();var r=String(this);if(t=Number(t)||0,t<0||t===1/0)throw RangeError();if(1===t)return r;for(var e="";t;)1&t&&(e+=r),(t>>=1)&&(r+=r);return e}),String.prototype.includes||(String.prototype.includes=function(t,r){"use strict";return"number"!=typeof r&&(r=0),!(r+t.length>this.length)&&this.indexOf(t,r)!==-1}),String.prototype.codePointAt||(String.prototype.codePointAt=function(t){if(null==this)throw TypeError();var r=String(this),e=r.length,n=t?Number(t):0;if(Number.isNaN(n)&&(n=0),!(n<0||n>=e)){var i,o=r.charCodeAt(n);return o>=55296&&o<=56319&&e>n+1&&(i=r.charCodeAt(n+1),i>=56320&&i<=57343)?1024*(o-55296)+i-56320+65536:o}})}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(e){function r(e,r){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=Object(this),t=n.length>>>0,o=0;o<t;o++)if(e.call(r,n[o],o,n))return o;return-1}Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{enumerable:!1,writable:!0,configurable:!0,value:r}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{enumerable:!1,writable:!0,configurable:!0,value:function(e,n){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");var t=r.call(this,e,n);return t===-1?void 0:this[t]}}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{enumerable:!1,writable:!0,configurable:!0,value:function(e){var r=Object(this),n=parseInt(r.length)||0;if(0===n)return!1;var t,o=parseInt(arguments[1])||0;o>=0?t=o:(t=n+o,t<0&&(t=0));for(var i;t<n;){if(i=r[t],e===i||e!==e&&i!==i)return!0;t++}return!1}})}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(n){Array.from||(Array.from=function(n){if(null==n)throw new TypeError("Object is null or undefined");var e,o,t=arguments[1],f=arguments[2],r=this,l=Object(n),i="function"==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:"@@iterator",u="function"==typeof t,y="function"==typeof l[i],a=0;if(y){e="function"==typeof r?new r:[];for(var c,p=l[i]();!(c=p.next()).done;)o=c.value,u&&(o=t.call(f,o,a)),e[a]=o,a+=1;return e.length=a,e}var b=l.length;for((isNaN(b)||b<0)&&(b=0),e="function"==typeof r?new r(b):new Array(b);a<b;)o=l[a],u&&(o=t.call(f,o,a)),e[a]=o,a+=1;return e.length=a,e})}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(e){!function(){"use strict";var e=Object.prototype.hasOwnProperty;"function"!=typeof Object.entries&&(Object.entries=function(n){if(null==n)throw new TypeError("Object.entries called on non-object");var t=[];for(var o in n)e.call(n,o)&&t.push([o,n[o]]);return t}),"function"!=typeof Object.values&&(Object.values=function(n){if(null==n)throw new TypeError("Object.values called on non-object");var t=[];for(var o in n)e.call(n,o)&&t.push(n[o]);return t})}()}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(e){var r=e.babelHelpers={};r.typeof="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof e},r.createRawReactElement=function(){var e="function"==typeof Symbol&&("function"==typeof Symbol?Symbol.for:"@@for")&&("function"==typeof Symbol?Symbol.for:"@@for")("react.element")||60103;return function(r,t,n){return{$$typeof:e,type:r,key:t,ref:null,props:n,_owner:null}}}(),r.classCallCheck=function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")},r.createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),r.defineEnumerableProperties=function(e,r){for(var t in r){var n=r[t];n.configurable=n.enumerable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,t,n)}return e},r.defineProperty=function(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e},r._extends=r.extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.get=function e(r,t,n){null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,t);if(void 0===o){var i=Object.getPrototypeOf(r);return null===i?void 0:e(i,t,n)}if("value"in o)return o.value;var f=o.get;if(void 0!==f)return f.call(n)},r.inherits=function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)},r.interopRequireDefault=function(e){return e&&e.__esModule?e:{default:e}},r.interopRequireWildcard=function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r},r.objectWithoutProperties=function(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.possibleConstructorReturn=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r},r.slicedToArray=function(){function e(e,r){var t=[],n=!0,o=!1,i=void 0;try{for(var f,u=e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(f=u.next()).done)&&(t.push(f.value),!r||t.length!==r);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}return t}return function(r,t){if(Array.isArray(r))return r;if(("function"==typeof Symbol?Symbol.iterator:"@@iterator")in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r.taggedTemplateLiteral=function(e,r){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))},r.toArray=function(e){return Array.isArray(e)?e:Array.from(e)},r.toConsumableArray=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
__d(function(r,t,n,o){function c(r){if("win32"===e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,n=t.exec(r),o=n[1]||"",c=o&&":"!==o.charAt(1);return!!n[2]||c}return"/"===r.charAt(0)}var e=void 0!==process?process.platform:"";n.exports=c,c.setPlatform=function(r){e=r}},0);
;require(0);
\ No newline at end of file
D4OD3'd9
\ No newline at end of file
...@@ -34,7 +34,7 @@ public class MainApplication extends Application implements ReactApplication { ...@@ -34,7 +34,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()
); );
......
...@@ -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
...@@ -9,3 +9,5 @@ ...@@ -9,3 +9,5 @@
# header note. # header note.
#Wed Sep 27 15:26:11 CST 2017 #Wed Sep 27 15:26:11 CST 2017
sdk.dir=/Users/yaohx_169/Library/Android/sdk sdk.dir=/Users/yaohx_169/Library/Android/sdk
code_push.key_production=1jJDUki8dREADfZnMQWgjrk02K1Q4ksvOXqog
code_push.key_staging=09Bbn7Y3d8WBtouy9x5JxTjVvZgI4ksvOXqog
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论