Browse Source

beta release

xiongzhu 7 years ago
parent
commit
7881b33d81
100 changed files with 704 additions and 656 deletions
  1. 8 9
      config.xml
  2. BIN
      icon.png
  3. BIN
      ios_icons/icon-100.png
  4. BIN
      ios_icons/icon-1024.png
  5. BIN
      ios_icons/icon-114.png
  6. BIN
      ios_icons/icon-120.png
  7. BIN
      ios_icons/icon-144.png
  8. BIN
      ios_icons/icon-152.png
  9. BIN
      ios_icons/icon-167.png
  10. BIN
      ios_icons/icon-180.png
  11. BIN
      ios_icons/icon-20.png
  12. BIN
      ios_icons/icon-29.png
  13. BIN
      ios_icons/icon-40.png
  14. BIN
      ios_icons/icon-50.png
  15. BIN
      ios_icons/icon-57.png
  16. BIN
      ios_icons/icon-58.png
  17. BIN
      ios_icons/icon-60.png
  18. BIN
      ios_icons/icon-72.png
  19. BIN
      ios_icons/icon-76.png
  20. BIN
      ios_icons/icon-80.png
  21. BIN
      ios_icons/icon-87.png
  22. 54 62
      package-lock.json
  23. 3 3
      package.json
  24. 1 1
      platforms/android/CordovaLib/AndroidManifest.xml
  25. 0 91
      platforms/android/CordovaLib/CordovaLib.iml
  26. 7 7
      platforms/android/CordovaLib/build.gradle
  27. 6 2
      platforms/android/CordovaLib/cordova.gradle
  28. 1 1
      platforms/android/CordovaLib/project.properties
  29. 2 1
      platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java
  30. 5 0
      platforms/android/CordovaLib/src/org/apache/cordova/CordovaBridge.java
  31. 9 0
      platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java
  32. 10 1
      platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterface.java
  33. 8 0
      platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java
  34. 1 0
      platforms/android/CordovaLib/src/org/apache/cordova/CordovaResourceApi.java
  35. 1 1
      platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebView.java
  36. 2 0
      platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebViewImpl.java
  37. 3 0
      platforms/android/CordovaLib/src/org/apache/cordova/NativeToJsMessageQueue.java
  38. 0 15
      platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebChromeClient.java
  39. 2 9
      platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewClient.java
  40. 11 46
      platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewEngine.java
  41. 0 155
      platforms/android/android.iml
  42. 12 12
      platforms/android/android.json
  43. 325 0
      platforms/android/app/build.gradle
  44. 1 1
      platforms/android/app/src/main/AndroidManifest.xml
  45. 0 0
      platforms/android/app/src/main/assets/www/chcp.json
  46. 0 0
      platforms/android/app/src/main/assets/www/chcp.manifest
  47. 0 0
      platforms/android/app/src/main/assets/www/cordova-js-src/android/nativeapiprovider.js
  48. 0 0
      platforms/android/app/src/main/assets/www/cordova-js-src/android/promptbasednativeapi.js
  49. 0 0
      platforms/android/app/src/main/assets/www/cordova-js-src/exec.js
  50. 0 0
      platforms/android/app/src/main/assets/www/cordova-js-src/platform.js
  51. 0 0
      platforms/android/app/src/main/assets/www/cordova-js-src/plugin/android/app.js
  52. 229 236
      platforms/android/app/src/main/assets/www/cordova.js
  53. 2 2
      platforms/android/app/src/main/assets/www/cordova_plugins.js
  54. 0 0
      platforms/android/app/src/main/assets/www/css/index.css
  55. 1 1
      platforms/android/app/src/main/assets/www/dianjing.html
  56. 0 0
      platforms/android/app/src/main/assets/www/huanbaojia.html
  57. 0 0
      platforms/android/app/src/main/assets/www/img/logo.png
  58. 0 0
      platforms/android/app/src/main/assets/www/index.html
  59. 0 0
      platforms/android/app/src/main/assets/www/js/index.js
  60. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-camera/www/Camera.js
  61. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-camera/www/CameraConstants.js
  62. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-camera/www/CameraPopoverHandle.js
  63. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-camera/www/CameraPopoverOptions.js
  64. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-clipboard-x/www/clipboard.js
  65. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-device/www/device.js
  66. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/DirectoryEntry.js
  67. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/DirectoryReader.js
  68. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/Entry.js
  69. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/File.js
  70. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileEntry.js
  71. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileError.js
  72. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileReader.js
  73. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileSystem.js
  74. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileUploadOptions.js
  75. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileUploadResult.js
  76. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileWriter.js
  77. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/Flags.js
  78. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/LocalFileSystem.js
  79. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/Metadata.js
  80. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/ProgressEvent.js
  81. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/android/FileSystem.js
  82. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/browser/isChrome.js
  83. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/fileSystemPaths.js
  84. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/fileSystems-roots.js
  85. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/fileSystems.js
  86. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/requestFileSystem.js
  87. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js
  88. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js
  89. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js
  90. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-statusbar/www/statusbar.js
  91. 0 0
      platforms/android/app/src/main/assets/www/plugins/cordova-plugin-x-toast/www/Toast.js
  92. 0 0
      platforms/android/app/src/main/assets/www/static/css/app.8f48f06f819bd48813a5fa9edfbb5a40.css
  93. 0 0
      platforms/android/app/src/main/assets/www/static/css/app.8f48f06f819bd48813a5fa9edfbb5a40.css.map
  94. 0 0
      platforms/android/app/src/main/assets/www/static/img/icon_alert.16e4849.png
  95. 0 0
      platforms/android/app/src/main/assets/www/static/img/icon_search_empty.73152aa.png
  96. 0 0
      platforms/android/app/src/main/assets/www/static/img/icon_success_green.79b5945.png
  97. BIN
      platforms/android/app/src/main/assets/www/static/img/login_logo.e35b46c.png
  98. 0 0
      platforms/android/app/src/main/assets/www/static/js/app.7ae2e545f359c1193883.js
  99. 0 0
      platforms/android/app/src/main/assets/www/static/js/app.7ae2e545f359c1193883.js.map
  100. 0 0
      platforms/android/app/src/main/assets/www/static/js/manifest.3ad1d5771e9b13dbdad2.js

+ 8 - 9
config.xml

@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='utf-8'?>
 <widget id="com.izouma.dianjing" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
-    <name>电竞</name>
+    <name>元气竞技场</name>
     <description>        A sample Apache Cordova application that responds to the deviceready event.    </description>
     <author email="dev@cordova.apache.org" href="http://cordova.io">        Apache Cordova Team    </author>
     <content src="dianjing.html#/home/matchList" />
@@ -13,7 +13,6 @@
     <allow-intent href="mailto:*" />
     <allow-intent href="geo:*" />
     <platform name="android">
-        <name>电竞</name>
         <allow-intent href="market:*" />
         <access origin="*" />
         <allow-navigation href="*" />
@@ -34,12 +33,11 @@
             <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
             <uses-permission android:name="android.permission.READ_PHONE_STATE" />
         </config-file>
-        <icon density="ldpi" src="res/icon/android/mipmap-ldpi/ic_launcher.png" />
-        <icon density="mdpi" src="res/icon/android/mipmap-mdpi/ic_launcher.png" />
-        <icon density="hdpi" src="res/icon/android/mipmap-hdpi/ic_launcher.png" />
-        <icon density="xhdpi" src="res/icon/android/mipmap-xhdpi/ic_launcher.png" />
-        <icon density="xxhdpi" src="res/icon/android/mipmap-xxhdpi/ic_launcher.png" />
-        <icon density="xxxhdpi" src="res/icon/android/mipmap-xxxhdpi/ic_launcher.png" />
+        <icon density="mdpi" src="res/icon/android/android_icon_48px.png" />
+        <icon density="hdpi" src="res/icon/android/android_icon_72px.png" />
+        <icon density="xhdpi" src="res/icon/android/android_icon_96px.png" />
+        <icon density="xxhdpi" src="res/icon/android/android_icon_144px.png" />
+        <icon density="xxxhdpi" src="res/icon/android/android_icon_192px.png" />
         <splash density="ldpi" src="res/screen/android/splash.png" />
         <splash density="mdpi" src="res/screen/android/splash.png" />
         <splash density="hdpi" src="res/screen/android/splash.png" />
@@ -109,11 +107,12 @@
     <preference name="ShowSplashScreenSpinner" value="false" />
     <preference name="SplashMaintainAspectRatio" value="true" />
     <preference name="SplashScreenDelay" value="4000" />
+    <preference name="xwalkMultipleApk" value="false" />
     <plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
     <plugin name="cordova-plugin-remote-injection" spec="^0.5.2" />
     <plugin name="cordova-plugin-crosswalk-webview" spec="https://github.com/fribace/cordova-plugin-crosswalk-webview.git" />
     <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
     <plugin name="cordova-plugin-wkwebview-engine" spec="^1.1.4" />
-    <engine name="android" spec="^6.3.0" />
     <engine name="ios" spec="^4.5.5" />
+    <engine name="android" spec="^7.1.2" />
 </widget>

BIN
icon.png


BIN
ios_icons/icon-100.png


BIN
ios_icons/icon-1024.png


BIN
ios_icons/icon-114.png


BIN
ios_icons/icon-120.png


BIN
ios_icons/icon-144.png


BIN
ios_icons/icon-152.png


BIN
ios_icons/icon-167.png


BIN
ios_icons/icon-180.png


BIN
ios_icons/icon-20.png


BIN
ios_icons/icon-29.png


BIN
ios_icons/icon-40.png


BIN
ios_icons/icon-50.png


BIN
ios_icons/icon-57.png


BIN
ios_icons/icon-58.png


BIN
ios_icons/icon-60.png


BIN
ios_icons/icon-72.png


BIN
ios_icons/icon-76.png


BIN
ios_icons/icon-80.png


BIN
ios_icons/icon-87.png


+ 54 - 62
package-lock.json

@@ -15,14 +15,6 @@
                 "json-schema-traverse": "^0.3.0"
             }
         },
-        "android-versions": {
-            "version": "1.3.0",
-            "resolved": "http://registry.npm.taobao.org/android-versions/download/android-versions-1.3.0.tgz",
-            "integrity": "sha1-zm8+ri4WXOTtSbib62gBR0EJMEQ=",
-            "requires": {
-                "semver": "^5.4.1"
-            }
-        },
         "ansi-regex": {
             "version": "2.1.1",
             "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz",
@@ -171,23 +163,53 @@
             "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
         },
         "cordova-android": {
-            "version": "6.3.0",
-            "resolved": "http://registry.npm.taobao.org/cordova-android/download/cordova-android-6.3.0.tgz",
-            "integrity": "sha1-2lQYQz0lx1pZd7QoJEu+Q30BKNI=",
+            "version": "7.1.2",
+            "resolved": "http://registry.npm.taobao.org/cordova-android/download/cordova-android-7.1.2.tgz",
+            "integrity": "sha1-rvpWWJNhhMC/SVBAhwRtsu1ryzI=",
             "requires": {
-                "android-versions": "^1.2.0",
-                "cordova-common": "^2.1.0",
+                "abbrev": "*",
+                "android-versions": "1.3.0",
+                "ansi": "*",
+                "balanced-match": "*",
+                "base64-js": "1.2.0",
+                "big-integer": "*",
+                "bplist-parser": "*",
+                "brace-expansion": "*",
+                "concat-map": "*",
+                "cordova-common": "2.2.5",
+                "cordova-registry-mapper": "*",
                 "elementtree": "0.1.6",
-                "nopt": "^3.0.1",
-                "properties-parser": "^0.2.3",
-                "q": "^1.4.1",
-                "shelljs": "^0.5.3"
+                "glob": "5.0.15",
+                "inflight": "*",
+                "inherits": "*",
+                "minimatch": "*",
+                "nopt": "3.0.1",
+                "once": "*",
+                "path-is-absolute": "*",
+                "plist": "2.1.0",
+                "properties-parser": "0.2.3",
+                "q": "1.4.1",
+                "sax": "0.3.5",
+                "semver": "*",
+                "shelljs": "0.5.3",
+                "underscore": "*",
+                "unorm": "*",
+                "wrappy": "*",
+                "xmlbuilder": "8.2.2",
+                "xmldom": "*"
             },
             "dependencies": {
                 "abbrev": {
-                    "version": "1.1.0",
+                    "version": "1.1.1",
                     "bundled": true
                 },
+                "android-versions": {
+                    "version": "1.3.0",
+                    "bundled": true,
+                    "requires": {
+                        "semver": "^5.4.1"
+                    }
+                },
                 "ansi": {
                     "version": "0.3.1",
                     "bundled": true
@@ -197,11 +219,11 @@
                     "bundled": true
                 },
                 "base64-js": {
-                    "version": "0.0.8",
+                    "version": "1.2.0",
                     "bundled": true
                 },
                 "big-integer": {
-                    "version": "1.6.25",
+                    "version": "1.6.32",
                     "bundled": true
                 },
                 "bplist-parser": {
@@ -212,7 +234,7 @@
                     }
                 },
                 "brace-expansion": {
-                    "version": "1.1.8",
+                    "version": "1.1.11",
                     "bundled": true,
                     "requires": {
                         "balanced-match": "^1.0.0",
@@ -224,7 +246,7 @@
                     "bundled": true
                 },
                 "cordova-common": {
-                    "version": "2.1.0",
+                    "version": "2.2.5",
                     "bundled": true,
                     "requires": {
                         "ansi": "^0.3.1",
@@ -233,10 +255,8 @@
                         "elementtree": "0.1.6",
                         "glob": "^5.0.13",
                         "minimatch": "^3.0.0",
-                        "osenv": "^0.1.3",
-                        "plist": "^1.2.0",
+                        "plist": "^2.1.0",
                         "q": "^1.4.1",
-                        "semver": "^5.0.1",
                         "shelljs": "^0.5.3",
                         "underscore": "^1.8.3",
                         "unorm": "^1.3.3"
@@ -276,10 +296,6 @@
                     "version": "2.0.3",
                     "bundled": true
                 },
-                "lodash": {
-                    "version": "3.10.1",
-                    "bundled": true
-                },
                 "minimatch": {
                     "version": "3.0.4",
                     "bundled": true,
@@ -288,7 +304,7 @@
                     }
                 },
                 "nopt": {
-                    "version": "3.0.6",
+                    "version": "3.0.1",
                     "bundled": true,
                     "requires": {
                         "abbrev": "1"
@@ -301,33 +317,16 @@
                         "wrappy": "1"
                     }
                 },
-                "os-homedir": {
-                    "version": "1.0.2",
-                    "bundled": true
-                },
-                "os-tmpdir": {
-                    "version": "1.0.2",
-                    "bundled": true
-                },
-                "osenv": {
-                    "version": "0.1.4",
-                    "bundled": true,
-                    "requires": {
-                        "os-homedir": "^1.0.0",
-                        "os-tmpdir": "^1.0.0"
-                    }
-                },
                 "path-is-absolute": {
                     "version": "1.0.1",
                     "bundled": true
                 },
                 "plist": {
-                    "version": "1.2.0",
+                    "version": "2.1.0",
                     "bundled": true,
                     "requires": {
-                        "base64-js": "0.0.8",
-                        "util-deprecate": "1.0.2",
-                        "xmlbuilder": "4.0.0",
+                        "base64-js": "1.2.0",
+                        "xmlbuilder": "8.2.2",
                         "xmldom": "0.1.x"
                     }
                 },
@@ -336,7 +335,7 @@
                     "bundled": true
                 },
                 "q": {
-                    "version": "1.5.0",
+                    "version": "1.4.1",
                     "bundled": true
                 },
                 "sax": {
@@ -344,7 +343,7 @@
                     "bundled": true
                 },
                 "semver": {
-                    "version": "5.4.1",
+                    "version": "5.5.0",
                     "bundled": true
                 },
                 "shelljs": {
@@ -352,27 +351,20 @@
                     "bundled": true
                 },
                 "underscore": {
-                    "version": "1.8.3",
+                    "version": "1.9.1",
                     "bundled": true
                 },
                 "unorm": {
                     "version": "1.4.1",
                     "bundled": true
                 },
-                "util-deprecate": {
-                    "version": "1.0.2",
-                    "bundled": true
-                },
                 "wrappy": {
                     "version": "1.0.2",
                     "bundled": true
                 },
                 "xmlbuilder": {
-                    "version": "4.0.0",
-                    "bundled": true,
-                    "requires": {
-                        "lodash": "^3.5.0"
-                    }
+                    "version": "8.2.2",
+                    "bundled": true
                 },
                 "xmldom": {
                     "version": "0.1.27",

+ 3 - 3
package.json

@@ -10,7 +10,7 @@
     "author": "Apache Cordova Team",
     "license": "Apache-2.0",
     "dependencies": {
-        "cordova-android": "^6.3.0",
+        "cordova-android": "^7.1.2",
         "cordova-ios": "^4.5.5",
         "cordova-plugin-camera": "^4.0.3",
         "cordova-plugin-clipboard-x": "^1.0.1",
@@ -45,8 +45,8 @@
             "cordova-plugin-wkwebview-engine": {}
         },
         "platforms": [
-            "android",
-            "ios"
+            "ios",
+            "android"
         ]
     }
 }

+ 1 - 1
platforms/android/CordovaLib/AndroidManifest.xml

@@ -19,5 +19,5 @@
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="org.apache.cordova" android:versionName="1.0" android:versionCode="1">
-    <uses-sdk android:minSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="19" />
 </manifest>

+ 0 - 91
platforms/android/CordovaLib/CordovaLib.iml

@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":CordovaLib" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="android-gradle" name="Android-Gradle">
-      <configuration>
-        <option name="GRADLE_PROJECT_PATH" value=":CordovaLib" />
-      </configuration>
-    </facet>
-    <facet type="android" name="Android">
-      <configuration>
-        <option name="SELECTED_BUILD_VARIANT" value="debug" />
-        <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
-        <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
-        <afterSyncTasks>
-          <task>generateDebugSources</task>
-        </afterSyncTasks>
-        <option name="ALLOW_USER_CONFIGURATION" value="false" />
-        <option name="RES_FOLDERS_RELATIVE_PATH" value="" />
-        <option name="PROJECT_TYPE" value="1" />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6">
-    <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
-    <output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
-    <exclude-output />
-    <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/aidl/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/rs/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/res/rs/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-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/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
-      <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
-      <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
-    </content>
-    <orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 7 - 7
platforms/android/CordovaLib/build.gradle

@@ -24,14 +24,14 @@ ext {
 
 buildscript {
     repositories {
-        jcenter()
         maven {
             url "https://maven.google.com"
         }
+        jcenter()
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:3.0.1'
         classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
         classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
     }
@@ -42,7 +42,7 @@ apply plugin: 'com.github.dcendents.android-maven'
 apply plugin: 'com.jfrog.bintray'
 
 group = 'org.apache.cordova'
-version = '6.3.0'
+version = '7.1.2'
 
 android {
     compileSdkVersion cdvCompileSdkVersion
@@ -50,8 +50,8 @@ android {
     publishNonDefault true
 
     compileOptions {
-        sourceCompatibility JavaVersion.VERSION_1_6
-        targetCompatibility JavaVersion.VERSION_1_6
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
     }
 
     sourceSets {
@@ -129,9 +129,9 @@ bintray {
         licenses = ['Apache-2.0']
         labels = ['android', 'cordova', 'phonegap']
         version {
-            name = '6.3.0'
+            name = '7.1.2'
             released  = new Date()
-            vcsTag = '6.3.0'
+            vcsTag = '7.1.2'
         }
     }
 }

+ 6 - 2
platforms/android/CordovaLib/cordova.gradle

@@ -29,7 +29,11 @@ String doEnsureValueExists(filePath, props, key) {
 
 String doGetProjectTarget() {
     def props = new Properties()
-    file('project.properties').withReader { reader ->
+    def propertiesFile = 'project.properties';
+    if(!(file(propertiesFile).exists())) {
+      propertiesFile = '../project.properties';
+    }
+    file(propertiesFile).withReader { reader ->
         props.load(reader)
     }
     return doEnsureValueExists('project.properties', props, 'target')
@@ -161,7 +165,7 @@ def doPromptForPassword(msg) {
 }
 
 def doGetConfigXml() {
-    def xml = file("res/xml/config.xml").getText()
+    def xml = file("src/main/res/xml/config.xml").getText()
     // Disable namespace awareness since Cordova doesn't use them properly
     return new XmlParser(false, false).parseText(xml)
 }

+ 1 - 1
platforms/android/CordovaLib/project.properties

@@ -10,7 +10,7 @@
 # Indicates whether an apk should be generated for each density.
 split.density=false
 # Project target.
-target=android-26
+target=android-27
 apk-configurations=
 renderscript.opt.level=O0
 android.library=true

+ 2 - 1
platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java

@@ -123,7 +123,7 @@ public class CordovaActivity extends Activity {
         if (preferences.getBoolean("Fullscreen", false)) {
             // NOTE: use the FullscreenNotImmersive configuration key to set the activity in a REAL full screen
             // (as was the case in previous cordova versions)
-            if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) && !preferences.getBoolean("FullscreenNotImmersive", false)) {
+            if (!preferences.getBoolean("FullscreenNotImmersive", false)) {
                 immersiveMode = true;
             } else {
                 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
@@ -319,6 +319,7 @@ public class CordovaActivity extends Activity {
     /**
      * Called when view focus is changed
      */
+    @SuppressLint("InlinedApi")
     @Override
     public void onWindowFocusChanged(boolean hasFocus) {
         super.onWindowFocusChanged(hasFocus);

+ 5 - 0
platforms/android/CordovaLib/src/org/apache/cordova/CordovaBridge.java

@@ -18,6 +18,8 @@
 */
 package org.apache.cordova;
 
+import android.annotation.SuppressLint;
+
 import java.security.SecureRandom;
 
 import org.json.JSONArray;
@@ -110,6 +112,9 @@ public class CordovaBridge {
     }
 
     /** Called by cordova.js to initialize the bridge. */
+    //On old Androids SecureRandom isn't really secure, this is the least of your problems if
+    //you're running Android 4.3 and below in 2017
+    @SuppressLint("TrulyRandom")
     int generateBridgeSecret() {
         SecureRandom randGen = new SecureRandom();
         expectedBridgeSecret = randGen.nextInt(Integer.MAX_VALUE);

+ 9 - 0
platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java

@@ -22,10 +22,12 @@ import java.security.Principal;
 import java.security.PrivateKey;
 import java.security.cert.X509Certificate;
 
+import android.annotation.SuppressLint;
 import android.webkit.ClientCertRequest;
 
 /**
  * Implementation of the ICordovaClientCertRequest for Android WebView.
+ *
  */
 public class CordovaClientCertRequest implements ICordovaClientCertRequest {
 
@@ -38,6 +40,7 @@ public class CordovaClientCertRequest implements ICordovaClientCertRequest {
     /**
      * Cancel this request
      */
+    @SuppressLint("NewApi")
     public void cancel()
     {
         request.cancel();
@@ -46,6 +49,7 @@ public class CordovaClientCertRequest implements ICordovaClientCertRequest {
     /*
      * Returns the host name of the server requesting the certificate.
      */
+    @SuppressLint("NewApi")
     public String getHost()
     {
         return request.getHost();
@@ -54,6 +58,7 @@ public class CordovaClientCertRequest implements ICordovaClientCertRequest {
     /*
      * Returns the acceptable types of asymmetric keys (can be null).
      */
+    @SuppressLint("NewApi")
     public String[] getKeyTypes()
     {
         return request.getKeyTypes();
@@ -62,6 +67,7 @@ public class CordovaClientCertRequest implements ICordovaClientCertRequest {
     /*
      * Returns the port number of the server requesting the certificate.
      */
+    @SuppressLint("NewApi")
     public int getPort()
     {
         return request.getPort();
@@ -70,6 +76,7 @@ public class CordovaClientCertRequest implements ICordovaClientCertRequest {
     /*
      * Returns the acceptable certificate issuers for the certificate matching the private key (can be null).
      */
+    @SuppressLint("NewApi")
     public Principal[] getPrincipals()
     {
         return request.getPrincipals();
@@ -78,6 +85,7 @@ public class CordovaClientCertRequest implements ICordovaClientCertRequest {
     /*
      * Ignore the request for now. Do not remember user's choice.
      */
+    @SuppressLint("NewApi")
     public void ignore()
     {
         request.ignore();
@@ -89,6 +97,7 @@ public class CordovaClientCertRequest implements ICordovaClientCertRequest {
      * @param privateKey The privateKey
      * @param chain The certificate chain 
      */
+    @SuppressLint("NewApi")
     public void proceed(PrivateKey privateKey, X509Certificate[] chain)
     {
         request.proceed(privateKey, chain);

+ 10 - 1
platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterface.java

@@ -19,6 +19,7 @@
 package org.apache.cordova;
 
 import android.app.Activity;
+import android.content.Context;
 import android.content.Intent;
 
 import org.apache.cordova.CordovaPlugin;
@@ -51,10 +52,18 @@ public interface CordovaInterface {
     /**
      * Get the Android activity.
      *
+     * If a custom engine lives outside of the Activity's lifecycle the return value may be null.
+     *
      * @return the Activity
      */
     public abstract Activity getActivity();
-    
+
+    /**
+     * Get the Android context.
+     *
+     * @return the Context
+     */
+    public Context getContext();
 
     /**
      * Called when a message is sent to plugin.

+ 8 - 0
platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java

@@ -19,7 +19,9 @@
 
 package org.apache.cordova;
 
+import android.annotation.SuppressLint;
 import android.app.Activity;
+import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.os.Build;
@@ -84,6 +86,11 @@ public class CordovaInterfaceImpl implements CordovaInterface {
         return activity;
     }
 
+    @Override
+    public Context getContext() {
+        return activity;
+    }
+
     @Override
     public Object onMessage(String id, Object data) {
         if ("exit".equals(id)) {
@@ -221,6 +228,7 @@ public class CordovaInterfaceImpl implements CordovaInterface {
         requestPermissions(plugin, requestCode, permissions);
     }
 
+        @SuppressLint("NewApi")
     public void requestPermissions(CordovaPlugin plugin, int requestCode, String [] permissions) {
         int mappedRequestCode = permissionResultCallbacks.registerCallback(plugin, requestCode);
         getActivity().requestPermissions(permissions, mappedRequestCode);

+ 1 - 0
platforms/android/CordovaLib/src/org/apache/cordova/CordovaResourceApi.java

@@ -263,6 +263,7 @@ public class CordovaResourceApi {
                 } catch (FileNotFoundException e) {
                     // Will occur if the file is compressed.
                     inputStream = assetManager.open(assetPath);
+                    length = inputStream.available();
                 }
                 String mimeType = getMimeTypeFromPath(assetPath);
                 return new OpenForReadResult(uri, inputStream, mimeType, length, assetFd);

+ 1 - 1
platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebView.java

@@ -31,7 +31,7 @@ import android.webkit.WebChromeClient.CustomViewCallback;
  * are not expected to implement it.
  */
 public interface CordovaWebView {
-    public static final String CORDOVA_VERSION = "6.3.0";
+    public static final String CORDOVA_VERSION = "7.1.2";
 
     void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences);
 

+ 2 - 0
platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebViewImpl.java

@@ -18,6 +18,7 @@
 */
 package org.apache.cordova;
 
+import android.annotation.SuppressLint;
 import android.content.Context;
 import android.content.Intent;
 import android.net.Uri;
@@ -91,6 +92,7 @@ public class CordovaWebViewImpl implements CordovaWebView {
         init(cordova, new ArrayList<PluginEntry>(), new CordovaPreferences());
     }
 
+    @SuppressLint("Assert")
     @Override
     public void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences) {
         if (this.cordova != null) {

+ 3 - 0
platforms/android/CordovaLib/src/org/apache/cordova/NativeToJsMessageQueue.java

@@ -511,6 +511,9 @@ public class NativeToJsMessageQueue {
                             .append(pluginResult.getMessage())
                             .append("')");
                     break;
+                case PluginResult.MESSAGE_TYPE_NULL:
+                    sb.append("null");
+                    break;
                 default:
                     sb.append(pluginResult.getMessage());
             }

+ 0 - 15
platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebChromeClient.java

@@ -149,21 +149,6 @@ public class SystemWebChromeClient extends WebChromeClient {
         quotaUpdater.updateQuota(MAX_QUOTA);
     }
 
-    // console.log in api level 7: http://developer.android.com/guide/developing/debug-tasks.html
-    // Expect this to not compile in a future Android release!
-    @SuppressWarnings("deprecation")
-    @Override
-    public void onConsoleMessage(String message, int lineNumber, String sourceID)
-    {
-        //This is only for Android 2.1
-        if(android.os.Build.VERSION.SDK_INT == android.os.Build.VERSION_CODES.ECLAIR_MR1)
-        {
-            LOG.d(LOG_TAG, "%s: Line %d : %s", sourceID, lineNumber, message);
-            super.onConsoleMessage(message, lineNumber, sourceID);
-        }
-    }
-
-    @TargetApi(8)
     @Override
     public boolean onConsoleMessage(ConsoleMessage consoleMessage)
     {

+ 2 - 9
platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewClient.java

@@ -112,7 +112,7 @@ public class SystemWebViewClient extends WebViewClient {
      * @param request
      */
     @Override
-    @TargetApi(21)
+    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
     public void onReceivedClientCertRequest (WebView view, ClientCertRequest request)
     {
 
@@ -219,7 +219,6 @@ public class SystemWebViewClient extends WebViewClient {
      * @param handler       An SslErrorHandler object that will handle the user's response.
      * @param error         The SSL error object.
      */
-    @TargetApi(8)
     @Override
     public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
 
@@ -316,7 +315,6 @@ public class SystemWebViewClient extends WebViewClient {
         this.authenticationTokens.clear();
     }
 
-    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
     @Override
     public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
         try {
@@ -349,7 +347,7 @@ public class SystemWebViewClient extends WebViewClient {
     }
 
     private static boolean needsKitKatContentUrlFix(Uri uri) {
-        return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT && "content".equals(uri.getScheme());
+        return "content".equals(uri.getScheme());
     }
 
     private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
@@ -364,11 +362,6 @@ public class SystemWebViewClient extends WebViewClient {
             return false;
         }
 
-        switch(android.os.Build.VERSION.SDK_INT){
-            case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH:
-            case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
-                return true;
-        }
         return false;
     }
 }

+ 11 - 46
platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewEngine.java

@@ -121,9 +121,8 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
                 SystemWebViewEngine.this.cordova.getActivity().runOnUiThread(r);
             }
         }));
-        if(Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR2)
-            nativeToJsMessageQueue.addBridgeMode(new NativeToJsMessageQueue.EvalBridgeMode(this, cordova));
-	bridge = new CordovaBridge(pluginManager, nativeToJsMessageQueue);
+        nativeToJsMessageQueue.addBridgeMode(new NativeToJsMessageQueue.EvalBridgeMode(this, cordova));
+        bridge = new CordovaBridge(pluginManager, nativeToJsMessageQueue);
         exposeJsInterface(webView, bridge);
     }
 
@@ -153,26 +152,8 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
         settings.setJavaScriptCanOpenWindowsAutomatically(true);
         settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
 
-        // Set the nav dump for HTC 2.x devices (disabling for ICS, deprecated entirely for Jellybean 4.2)
-        try {
-            Method gingerbread_getMethod =  WebSettings.class.getMethod("setNavDump", new Class[] { boolean.class });
-
-            String manufacturer = android.os.Build.MANUFACTURER;
-            LOG.d(TAG, "CordovaWebView is running on device made by: " + manufacturer);
-            if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB &&
-                    android.os.Build.MANUFACTURER.contains("HTC"))
-            {
-                gingerbread_getMethod.invoke(settings, true);
-            }
-        } catch (NoSuchMethodException e) {
-            LOG.d(TAG, "We are on a modern version of Android, we will deprecate HTC 2.3 devices in 2.8");
-        } catch (IllegalArgumentException e) {
-            LOG.d(TAG, "Doing the NavDump failed with bad arguments");
-        } catch (IllegalAccessException e) {
-            LOG.d(TAG, "This should never happen: IllegalAccessException means this isn't Android anymore");
-        } catch (InvocationTargetException e) {
-            LOG.d(TAG, "This should never happen: InvocationTargetException means this isn't Android anymore.");
-        }
+        String manufacturer = android.os.Build.MANUFACTURER;
+        LOG.d(TAG, "CordovaWebView is running on device made by: " + manufacturer);
 
         //We don't save any form data in the application
         settings.setSaveFormData(false);
@@ -180,12 +161,9 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
 
         // Jellybean rightfully tried to lock this down. Too bad they didn't give us a whitelist
         // while we do this
-        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
-            settings.setAllowUniversalAccessFromFileURLs(true);
-        }
-        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
-            settings.setMediaPlaybackRequiresUserGesture(false);
-        }
+        settings.setAllowUniversalAccessFromFileURLs(true);
+        settings.setMediaPlaybackRequiresUserGesture(false);
+
         // Enable database
         // We keep this disabled because we use or shim to get around DOM_EXCEPTION_ERROR_16
         String databasePath = webView.getContext().getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
@@ -195,8 +173,7 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
 
         //Determine whether we're in debug or release mode, and turn on Debugging!
         ApplicationInfo appInfo = webView.getContext().getApplicationContext().getApplicationInfo();
-        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0 &&
-            android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
+        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
             enableRemoteDebugging();
         }
 
@@ -244,7 +221,6 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
         // end CB-1405
     }
 
-    @TargetApi(Build.VERSION_CODES.KITKAT)
     private void enableRemoteDebugging() {
         try {
             WebView.setWebContentsDebuggingEnabled(true);
@@ -254,14 +230,9 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
         }
     }
 
+    // Yeah, we know. It'd be great if lint was just a little smarter.
+    @SuppressLint("AddJavascriptInterface")
     private static void exposeJsInterface(WebView webView, CordovaBridge bridge) {
-        if ((Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1)) {
-            LOG.i(TAG, "Disabled addJavascriptInterface() bridge since Android version is old.");
-            // Bug being that Java Strings do not get converted to JS strings automatically.
-            // This isn't hard to work-around on the JS side, but it's easier to just
-            // use the prompt bridge instead.
-            return;
-        }
         SystemExposedJsApi exposedJsApi = new SystemExposedJsApi(bridge);
         webView.addJavascriptInterface(exposedJsApi, "_cordovaNative");
     }
@@ -343,12 +314,6 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
 
     @Override
     public void evaluateJavascript(String js, ValueCallback<String> callback) {
-        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
-            webView.evaluateJavascript(js, callback);
-        }
-        else
-        {
-            LOG.d(TAG, "This webview is using the old bridge");
-        }
+        webView.evaluateJavascript(js, callback);
     }
 }

+ 0 - 155
platforms/android/android.iml

@@ -1,155 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="android" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="android-gradle" name="Android-Gradle">
-      <configuration>
-        <option name="GRADLE_PROJECT_PATH" value=":" />
-      </configuration>
-    </facet>
-    <facet type="android" name="Android">
-      <configuration>
-        <option name="SELECTED_BUILD_VARIANT" value="armv7Debug" />
-        <option name="ASSEMBLE_TASK_NAME" value="assembleArmv7Debug" />
-        <option name="COMPILE_JAVA_TASK_NAME" value="compileArmv7DebugSources" />
-        <afterSyncTasks>
-          <task>generateArmv7DebugSources</task>
-        </afterSyncTasks>
-        <option name="ALLOW_USER_CONFIGURATION" value="false" />
-        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/res" />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6">
-    <output url="file://$MODULE_DIR$/build/intermediates/classes/armv7/debug" />
-    <output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/armv7/debug" />
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/armv7/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/armv7/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/armv7/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/armv7/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/armv7/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/armv7/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/armv7/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7Debug/res" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7Debug/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7Debug/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7Debug/aidl" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7Debug/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7Debug/rs" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7Debug/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/armv7/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/armv7/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/armv7/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/armv7/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/armv7/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/armv7/debug" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/armv7/debug" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7Debug/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7Debug/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7Debug/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7Debug/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7Debug/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7Debug/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7Debug/shaders" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7/res" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7/aidl" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7/rs" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/armv7/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testArmv7/shaders" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTestArmv7/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTestArmv7/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTestArmv7/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTestArmv7/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTestArmv7/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTestArmv7/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTestArmv7/shaders" isTestSource="true" />
-      <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/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/android.arch.core/runtime/1.1.0/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/android.arch.lifecycle/livedata-core/1.1.0/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/android.arch.lifecycle/runtime/1.1.0/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/android.arch.lifecycle/viewmodel/1.1.0/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/27.1.0/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-ui/27.1.0/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-utils/27.1.0/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-fragment/27.1.0/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-media-compat/27.1.0/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/27.1.0/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/23.53.589.4/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
-      <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/pre-dexed" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
-      <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
-      <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
-    </content>
-    <orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" exported="" name="Gradle: android.arch.lifecycle:common:1.1.0@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-fragment-27.1.0" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: android.arch.core:runtime-1.1.0" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: org.xwalk:xwalk_core_library-23.53.589.4" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: android.arch.lifecycle:viewmodel-1.1.0" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-compat-27.1.0" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-v4-27.1.0" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: android.arch.lifecycle:livedata-core-1.1.0" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-media-compat-27.1.0" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-annotations:27.1.0@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-core-utils-27.1.0" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: android.arch.core:common:1.1.0@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-core-ui-27.1.0" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: android.arch.lifecycle:runtime-1.1.0" level="project" />
-    <orderEntry type="module" module-name="CordovaLib" exported="" />
-  </component>
-</module>

+ 12 - 12
platforms/android/android.json

@@ -10,35 +10,35 @@
           "/*": [
             {
               "xml": "<uses-permission android:name=\"android.permission.INTERNET\" />",
-              "count": 58
+              "count": 34
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />",
-              "count": 29
+              "count": 17
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />",
-              "count": 29
+              "count": 17
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />",
-              "count": 30
+              "count": 18
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\" />",
-              "count": 29
+              "count": 17
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />",
-              "count": 30
+              "count": 18
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\" />",
-              "count": 29
+              "count": 17
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />",
-              "count": 29
+              "count": 17
             },
             {
               "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
@@ -175,10 +175,10 @@
     "cordova-plugin-whitelist": {
       "PACKAGE_NAME": "com.izouma.dianjing"
     },
-    "cordova-plugin-x-toast": {
+    "cordova-plugin-wkwebview-engine": {
       "PACKAGE_NAME": "com.izouma.dianjing"
     },
-    "cordova-plugin-wkwebview-engine": {
+    "cordova-plugin-x-toast": {
       "PACKAGE_NAME": "com.izouma.dianjing"
     }
   },
@@ -451,7 +451,7 @@
     "cordova-plugin-splashscreen": "5.0.2",
     "cordova-plugin-statusbar": "2.4.2",
     "cordova-plugin-whitelist": "1.3.3",
-    "cordova-plugin-x-toast": "2.6.2",
-    "cordova-plugin-wkwebview-engine": "1.1.4"
+    "cordova-plugin-wkwebview-engine": "1.1.4",
+    "cordova-plugin-x-toast": "2.6.2"
   }
 }

+ 325 - 0
platforms/android/app/build.gradle

@@ -0,0 +1,325 @@
+/*
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+*/
+
+apply plugin: 'com.android.application'
+
+buildscript {
+    repositories {
+        mavenCentral()
+        maven {
+            url "https://maven.google.com"
+        }
+        jcenter()
+    }
+
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.0.1'
+    }
+}
+
+// Allow plugins to declare Maven dependencies via build-extras.gradle.
+allprojects {
+    repositories {
+        mavenCentral();
+        jcenter()
+    }
+}
+
+task wrapper(type: Wrapper) {
+    gradleVersion = '4.1.0'
+}
+
+// Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties.
+// Refer to: http://www.gradle.org/docs/current/userguide/tutorial_this_and_that.html
+ext {
+    apply from: '../CordovaLib/cordova.gradle'
+    // The value for android.compileSdkVersion.
+    if (!project.hasProperty('cdvCompileSdkVersion')) {
+        cdvCompileSdkVersion = null;
+    }
+    // The value for android.buildToolsVersion.
+    if (!project.hasProperty('cdvBuildToolsVersion')) {
+        cdvBuildToolsVersion = null;
+    }
+    // Sets the versionCode to the given value.
+    if (!project.hasProperty('cdvVersionCode')) {
+        cdvVersionCode = null
+    }
+    // Sets the minSdkVersion to the given value.
+    if (!project.hasProperty('cdvMinSdkVersion')) {
+        cdvMinSdkVersion = null
+    }
+    // Whether to build architecture-specific APKs.
+    if (!project.hasProperty('cdvBuildMultipleApks')) {
+        cdvBuildMultipleApks = null
+    }
+    // Whether to append a 0 "abi digit" to versionCode when only a single APK is build 
+    if (!project.hasProperty('cdvVersionCodeForceAbiDigit')) {
+        cdvVersionCodeForceAbiDigit = null
+    }
+    // .properties files to use for release signing.
+    if (!project.hasProperty('cdvReleaseSigningPropertiesFile')) {
+        cdvReleaseSigningPropertiesFile = null
+    }
+    // .properties files to use for debug signing.
+    if (!project.hasProperty('cdvDebugSigningPropertiesFile')) {
+        cdvDebugSigningPropertiesFile = null
+    }
+    // Set by build.js script.
+    if (!project.hasProperty('cdvBuildArch')) {
+        cdvBuildArch = null
+    }
+
+    // Plugin gradle extensions can append to this to have code run at the end.
+    cdvPluginPostBuildExtras = []
+}
+
+// PLUGIN GRADLE EXTENSIONS START
+apply from: "../cordova-plugin-crosswalk-webview/dianjing-xwalk.gradle"
+// PLUGIN GRADLE EXTENSIONS END
+
+def hasBuildExtras = file('build-extras.gradle').exists()
+if (hasBuildExtras) {
+    apply from: 'build-extras.gradle'
+}
+
+// Set property defaults after extension .gradle files.
+if (ext.cdvCompileSdkVersion == null) {
+    ext.cdvCompileSdkVersion = privateHelpers.getProjectTarget()
+    //ext.cdvCompileSdkVersion = project.ext.defaultCompileSdkVersion
+}
+if (ext.cdvBuildToolsVersion == null) {
+    ext.cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
+    //ext.cdvBuildToolsVersion = project.ext.defaultBuildToolsVersion
+}
+if (ext.cdvDebugSigningPropertiesFile == null && file('../debug-signing.properties').exists()) {
+    ext.cdvDebugSigningPropertiesFile = '../debug-signing.properties'
+}
+if (ext.cdvReleaseSigningPropertiesFile == null && file('../release-signing.properties').exists()) {
+    ext.cdvReleaseSigningPropertiesFile = '../release-signing.properties'
+}
+
+// Cast to appropriate types.
+ext.cdvBuildMultipleApks = cdvBuildMultipleApks == null ? false : cdvBuildMultipleApks.toBoolean();
+ext.cdvVersionCodeForceAbiDigit = cdvVersionCodeForceAbiDigit == null ? false : cdvVersionCodeForceAbiDigit.toBoolean();
+ext.cdvMinSdkVersion = cdvMinSdkVersion == null ? null : defaultMinSdkVersion
+ext.cdvVersionCode = cdvVersionCode == null ? null : Integer.parseInt('' + cdvVersionCode)
+
+def computeBuildTargetName(debugBuild) {
+    def ret = 'assemble'
+    if (cdvBuildMultipleApks && cdvBuildArch) {
+        def arch = cdvBuildArch == 'arm' ? 'armv7' : cdvBuildArch
+        ret += '' + arch.toUpperCase().charAt(0) + arch.substring(1);
+    }
+    return ret + (debugBuild ? 'Debug' : 'Release')
+}
+
+// Make cdvBuild a task that depends on the debug/arch-sepecific task.
+task cdvBuildDebug
+cdvBuildDebug.dependsOn {
+    return computeBuildTargetName(true)
+}
+
+task cdvBuildRelease
+cdvBuildRelease.dependsOn {
+    return computeBuildTargetName(false)
+}
+
+task cdvPrintProps << {
+    println('cdvCompileSdkVersion=' + cdvCompileSdkVersion)
+    println('cdvBuildToolsVersion=' + cdvBuildToolsVersion)
+    println('cdvVersionCode=' + cdvVersionCode)
+    println('cdvVersionCodeForceAbiDigit=' + cdvVersionCodeForceAbiDigit)
+    println('cdvMinSdkVersion=' + cdvMinSdkVersion)
+    println('cdvBuildMultipleApks=' + cdvBuildMultipleApks)
+    println('cdvReleaseSigningPropertiesFile=' + cdvReleaseSigningPropertiesFile)
+    println('cdvDebugSigningPropertiesFile=' + cdvDebugSigningPropertiesFile)
+    println('cdvBuildArch=' + cdvBuildArch)
+    println('computedVersionCode=' + android.defaultConfig.versionCode)
+    android.productFlavors.each { flavor ->
+        println('computed' + flavor.name.capitalize() + 'VersionCode=' + flavor.versionCode)
+    }
+}
+
+android {
+
+    defaultConfig {
+        versionCode cdvVersionCode ?: new BigInteger("" + privateHelpers.extractIntFromManifest("versionCode"))
+        applicationId privateHelpers.extractStringFromManifest("package")
+
+        if (cdvMinSdkVersion != null) {
+            minSdkVersion cdvMinSdkVersion
+        }
+    }
+
+    lintOptions {
+      abortOnError false;
+    }
+
+    compileSdkVersion cdvCompileSdkVersion
+    buildToolsVersion cdvBuildToolsVersion
+
+    //This code exists for Crosswalk and other Native APIs.
+    //By default, we multiply the existing version code in the Android Manifest by 10 and 
+    //add a number for each architecture.  If you are not using Crosswalk or SQLite, you can
+    //ignore this chunk of code, and your version codes will be respected.
+
+    if (Boolean.valueOf(cdvBuildMultipleApks)) {
+        flavorDimensions "default"
+
+        productFlavors {
+            armeabi {
+                versionCode defaultConfig.versionCode*10 + 1
+                ndk {
+                    abiFilters = ["armeabi"]
+                }
+            }
+            armv7 {
+                versionCode defaultConfig.versionCode*10 + 2
+                ndk {
+                    abiFilters = ["armeabi-v7a"]
+                }
+            }
+            arm64 {
+                versionCode defaultConfig.versionCode*10 + 3
+                ndk {
+                    abiFilters = ["arm64-v8a"]
+                }
+            }
+            x86 {
+                versionCode defaultConfig.versionCode*10 + 4
+                ndk {
+                    abiFilters = ["x86"]
+                }
+            }
+            x86_64 {
+                versionCode defaultConfig.versionCode*10 + 5
+                ndk {
+                    abiFilters = ["x86_64"]
+                }
+            }
+        }
+    } else if (Boolean.valueOf(cdvVersionCodeForceAbiDigit)) {
+        // This provides compatibility to the default logic for versionCode before cordova-android 5.2.0
+        defaultConfig {
+            versionCode defaultConfig.versionCode*10
+        }
+    }
+
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+
+    if (cdvReleaseSigningPropertiesFile) {
+        signingConfigs {
+            release {
+                // These must be set or Gradle will complain (even if they are overridden).
+                keyAlias = ""
+                keyPassword = "__unset" // And these must be set to non-empty in order to have the signing step added to the task graph.
+                storeFile = null
+                storePassword = "__unset"
+            }
+        }
+        buildTypes {
+            release {
+                signingConfig signingConfigs.release
+            }
+        }
+        addSigningProps(cdvReleaseSigningPropertiesFile, signingConfigs.release)
+    }
+    if (cdvDebugSigningPropertiesFile) {
+        addSigningProps(cdvDebugSigningPropertiesFile, signingConfigs.debug)
+    }
+}
+
+/*
+ * WARNING: Cordova Lib and platform scripts do management inside of this code here,
+ * if you are adding the dependencies manually, do so outside the comments, otherwise
+ * the Cordova tools will overwrite them
+ */
+
+
+dependencies {
+    implementation fileTree(dir: 'libs', include: '*.jar')
+    // SUB-PROJECT DEPENDENCIES START
+    implementation(project(path: ":CordovaLib"))
+    compile "com.android.support:support-v4:24.1.1+"
+    // SUB-PROJECT DEPENDENCIES END
+}
+
+def promptForReleaseKeyPassword() {
+    if (!cdvReleaseSigningPropertiesFile) {
+        return;
+    }
+    if ('__unset'.equals(android.signingConfigs.release.storePassword)) {
+        android.signingConfigs.release.storePassword = privateHelpers.promptForPassword('Enter key store password: ')
+    }
+    if ('__unset'.equals(android.signingConfigs.release.keyPassword)) {
+        android.signingConfigs.release.keyPassword = privateHelpers.promptForPassword('Enter key password: ');
+    }
+}
+
+gradle.taskGraph.whenReady { taskGraph ->
+    taskGraph.getAllTasks().each() { task ->
+      if(['validateReleaseSigning', 'validateSigningRelease', 'validateSigningArmv7Release', 'validateSigningX76Release'].contains(task.name)) {
+         promptForReleaseKeyPassword()
+      }
+    }
+}
+
+def addSigningProps(propsFilePath, signingConfig) {
+    def propsFile = file(propsFilePath)
+    def props = new Properties()
+    propsFile.withReader { reader ->
+        props.load(reader)
+    }
+
+    def storeFile = new File(props.get('key.store') ?: privateHelpers.ensureValueExists(propsFilePath, props, 'storeFile'))
+    if (!storeFile.isAbsolute()) {
+        storeFile = RelativePath.parse(true, storeFile.toString()).getFile(propsFile.getParentFile())
+    }
+    if (!storeFile.exists()) {
+        throw new FileNotFoundException('Keystore file does not exist: ' + storeFile.getAbsolutePath())
+    }
+    signingConfig.keyAlias = props.get('key.alias') ?: privateHelpers.ensureValueExists(propsFilePath, props, 'keyAlias')
+    signingConfig.keyPassword = props.get('keyPassword', props.get('key.alias.password', signingConfig.keyPassword))
+    signingConfig.storeFile = storeFile
+    signingConfig.storePassword = props.get('storePassword', props.get('key.store.password', signingConfig.storePassword))
+    def storeType = props.get('storeType', props.get('key.store.type', ''))
+    if (!storeType) {
+        def filename = storeFile.getName().toLowerCase();
+        if (filename.endsWith('.p12') || filename.endsWith('.pfx')) {
+            storeType = 'pkcs12'
+        } else {
+            storeType = signingConfig.storeType // "jks"
+        }
+    }
+    signingConfig.storeType = storeType
+}
+
+for (def func : cdvPluginPostBuildExtras) {
+    func()
+}
+
+// This can be defined within build-extras.gradle as:
+//     ext.postBuildExtras = { ... code here ... }
+if (hasProperty('postBuildExtras')) {
+    postBuildExtras()
+}

+ 1 - 1
platforms/android/AndroidManifest.xml → platforms/android/app/src/main/AndroidManifest.xml

@@ -13,7 +13,7 @@
             <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/camera_provider_paths" />
         </provider>
     </application>
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />
+    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="27" />
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

+ 0 - 0
platforms/android/assets/www/chcp.json → platforms/android/app/src/main/assets/www/chcp.json


+ 0 - 0
platforms/android/assets/www/chcp.manifest → platforms/android/app/src/main/assets/www/chcp.manifest


+ 0 - 0
platforms/android/assets/www/cordova-js-src/android/nativeapiprovider.js → platforms/android/app/src/main/assets/www/cordova-js-src/android/nativeapiprovider.js


+ 0 - 0
platforms/android/assets/www/cordova-js-src/android/promptbasednativeapi.js → platforms/android/app/src/main/assets/www/cordova-js-src/android/promptbasednativeapi.js


+ 0 - 0
platforms/android/assets/www/cordova-js-src/exec.js → platforms/android/app/src/main/assets/www/cordova-js-src/exec.js


+ 0 - 0
platforms/android/assets/www/cordova-js-src/platform.js → platforms/android/app/src/main/assets/www/cordova-js-src/platform.js


+ 0 - 0
platforms/android/assets/www/cordova-js-src/plugin/android/app.js → platforms/android/app/src/main/assets/www/cordova-js-src/plugin/android/app.js


File diff suppressed because it is too large
+ 229 - 236
platforms/android/app/src/main/assets/www/cordova.js


+ 2 - 2
platforms/android/assets/www/cordova_plugins.js → platforms/android/app/src/main/assets/www/cordova_plugins.js

@@ -269,8 +269,8 @@ module.exports.metadata =
   "cordova-plugin-splashscreen": "5.0.2",
   "cordova-plugin-statusbar": "2.4.2",
   "cordova-plugin-whitelist": "1.3.3",
-  "cordova-plugin-x-toast": "2.6.2",
-  "cordova-plugin-wkwebview-engine": "1.1.4"
+  "cordova-plugin-wkwebview-engine": "1.1.4",
+  "cordova-plugin-x-toast": "2.6.2"
 };
 // BOTTOM OF METADATA
 });

+ 0 - 0
platforms/android/assets/www/css/index.css → platforms/android/app/src/main/assets/www/css/index.css


+ 1 - 1
platforms/android/assets/www/dianjing.html → platforms/android/app/src/main/assets/www/dianjing.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="initial-scale=1,width=device-width,viewport-fit=cover,user-scalable=no"><script src=./cordova.js></script><title>dianjing</title><link href=./static/css/app.d7b0000497165dd4be598863d4aefde0.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.e5aaf337e8770080039f.js></script><script type=text/javascript src=./static/js/app.303d29f36dd4c8701595.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="initial-scale=1,width=device-width,viewport-fit=cover,user-scalable=no"><script src=./cordova.js></script><title>dianjing</title><link href=./static/css/app.8f48f06f819bd48813a5fa9edfbb5a40.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.e5aaf337e8770080039f.js></script><script type=text/javascript src=./static/js/app.7ae2e545f359c1193883.js></script></body></html>

+ 0 - 0
platforms/android/assets/www/huanbaojia.html → platforms/android/app/src/main/assets/www/huanbaojia.html


+ 0 - 0
platforms/android/assets/www/img/logo.png → platforms/android/app/src/main/assets/www/img/logo.png


+ 0 - 0
platforms/android/assets/www/index.html → platforms/android/app/src/main/assets/www/index.html


+ 0 - 0
platforms/android/assets/www/js/index.js → platforms/android/app/src/main/assets/www/js/index.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-camera/www/Camera.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-camera/www/Camera.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-camera/www/CameraConstants.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-camera/www/CameraConstants.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-camera/www/CameraPopoverHandle.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-camera/www/CameraPopoverHandle.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-camera/www/CameraPopoverOptions.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-camera/www/CameraPopoverOptions.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-clipboard-x/www/clipboard.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-clipboard-x/www/clipboard.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-device/www/device.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-device/www/device.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/DirectoryEntry.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/DirectoryEntry.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/DirectoryReader.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/DirectoryReader.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/Entry.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/Entry.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/File.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/File.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/FileEntry.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileEntry.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/FileError.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileError.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/FileReader.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileReader.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/FileSystem.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileSystem.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/FileUploadOptions.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileUploadOptions.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/FileUploadResult.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileUploadResult.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/FileWriter.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/FileWriter.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/Flags.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/Flags.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/LocalFileSystem.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/LocalFileSystem.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/Metadata.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/Metadata.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/ProgressEvent.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/ProgressEvent.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/android/FileSystem.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/android/FileSystem.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/browser/isChrome.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/browser/isChrome.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/fileSystemPaths.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/fileSystemPaths.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/fileSystems-roots.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/fileSystems-roots.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/fileSystems.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/fileSystems.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/requestFileSystem.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/requestFileSystem.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-statusbar/www/statusbar.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-statusbar/www/statusbar.js


+ 0 - 0
platforms/android/assets/www/plugins/cordova-plugin-x-toast/www/Toast.js → platforms/android/app/src/main/assets/www/plugins/cordova-plugin-x-toast/www/Toast.js


File diff suppressed because it is too large
+ 0 - 0
platforms/android/app/src/main/assets/www/static/css/app.8f48f06f819bd48813a5fa9edfbb5a40.css


File diff suppressed because it is too large
+ 0 - 0
platforms/android/app/src/main/assets/www/static/css/app.8f48f06f819bd48813a5fa9edfbb5a40.css.map


+ 0 - 0
platforms/android/assets/www/static/img/icon_alert.16e4849.png → platforms/android/app/src/main/assets/www/static/img/icon_alert.16e4849.png


+ 0 - 0
platforms/android/assets/www/static/img/icon_search_empty.73152aa.png → platforms/android/app/src/main/assets/www/static/img/icon_search_empty.73152aa.png


+ 0 - 0
platforms/android/assets/www/static/img/icon_success_green.79b5945.png → platforms/android/app/src/main/assets/www/static/img/icon_success_green.79b5945.png


BIN
platforms/android/app/src/main/assets/www/static/img/login_logo.e35b46c.png


File diff suppressed because it is too large
+ 0 - 0
platforms/android/app/src/main/assets/www/static/js/app.7ae2e545f359c1193883.js


File diff suppressed because it is too large
+ 0 - 0
platforms/android/app/src/main/assets/www/static/js/app.7ae2e545f359c1193883.js.map


+ 0 - 0
platforms/android/assets/www/static/js/manifest.3ad1d5771e9b13dbdad2.js → platforms/android/app/src/main/assets/www/static/js/manifest.3ad1d5771e9b13dbdad2.js


Some files were not shown because too many files changed in this diff