diff options
| -rwxr-xr-x | build_android.sh | 34 | ||||
| -rw-r--r-- | config.xml | 6 | ||||
| -rw-r--r-- | package.json | 22 |
3 files changed, 33 insertions, 29 deletions
diff --git a/build_android.sh b/build_android.sh index 9d91fc92..42bb954e 100755 --- a/build_android.sh +++ b/build_android.sh @@ -8,8 +8,6 @@ if [ ! -f "$NINJAKEYSTORE" ]; then exit fi -# clean up past builds -rm -fr platforms/android/build/outputs/* mkdir release_files rm -f release_files/* @@ -27,18 +25,18 @@ if [ "$1" = "2" ]; then echo "only building native view (5+)" fi -echo "Cleaning past builds..." -cordova clean - ############ Crosswalk build #################################### if [ "$BUILD_MODE" = "xwalk" ] || [ "$BUILD_MODE" = "all" ]; then echo "Building Release mode for Xwalk android..." echo "--------------------------------------------" - echo "Adding crosswalk..." #ionic plugin add cordova-plugin-crosswalk-webview@9.8.0 --variable "XWALK_VERSION"="18+" - ionic plugin remove cordova-plugin-crosswalk-webview - ionic plugin add "https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview#1.8.0" --variable XWALK_MODE="lite" --variable "XWALK_VERSION"="17.46.459.1" + echo "Removing android and re-adding..." + cordova platform remove android + cordova platform add android + cordova plugin remove cordova-plugin-crosswalk-webview + echo "Adding crosswalk..." + cordova plugin add cordova-plugin-crosswalk-webview@2.2.0 --variable XWALK_MODE="lite" --variable "XWALK_VERSION"="17.46.459.1" #ionic plugin add cordova-plugin-crosswalk-webview # crosswalk handles SSL certificate handling in a different way @@ -49,7 +47,7 @@ if [ "$BUILD_MODE" = "xwalk" ] || [ "$BUILD_MODE" = "all" ]; then #ionic platform remove android #ionic platform add android cp "$NINJAKEYSTORE" platforms/android/ - ionic build android --release + cordova build android --release # copy builds to my release directory cp platforms/android/build/outputs/apk/android-x86-release-unsigned.apk release_files/ @@ -66,16 +64,20 @@ if [ "$BUILD_MODE" = "xwalk" ] || [ "$BUILD_MODE" = "all" ]; then cd .. fi + ############ Native web view build ############################### if [ "$BUILD_MODE" = "native" ] || [ "$BUILD_MODE" = "all" ]; then echo "Building Release mode for android 5+..." echo "--------------------------------------------" - #clean up past build stuff - rm -fr platforms/android/build/outputs/* + echo "Removing android and re-adding..." + cordova platform remove android + cordova platform add android + + #clean up past build stuff echo "Adding default browser..." - ionic plugin remove cordova-plugin-crosswalk-webview + cordova plugin remove cordova-plugin-crosswalk-webview # use the right plugin for SSL certificate mgmt cordova plugin remove cordova-plugin-crosswalk-certificate @@ -85,7 +87,7 @@ if [ "$BUILD_MODE" = "native" ] || [ "$BUILD_MODE" = "all" ]; then cp "$NINJAKEYSTORE" platforms/android/ # Make sure native builds are only deployed in devices < Android 5 - ionic build android --release -- --minSdkVersion=21 + cordova build android --release -- --minSdkVersion=21 #ionic build android --release -- --minSdkVersion=19 # copy build to release folder and sign @@ -97,9 +99,11 @@ if [ "$BUILD_MODE" = "native" ] || [ "$BUILD_MODE" = "all" ]; then ~/Library/Android/sdk/build-tools/22.0.1/zipalign -v 4 android-release-unsigned.apk zmNinja.apk rm -f android-release-unsigned.apk cd .. +fi + +# Do a phone perm check + ./checkperms.sh release_files/zmNinja.apk echo "*** Phone State Check:" ./checkperms.sh release_files/zmNinja.apk | grep PHONE_STATE -fi - @@ -9,7 +9,7 @@ </author> <content src="index.html" /> <access launch-external="yes" origin="mailto:*" /> - <access origin='*' allows-arbitrary-loads-in-media='true' allows-arbitrary-loads-in-web-content='true' allows-local-networking='true' minimum-tls-version='TLSv1.0' requires-forward-secrecy='false' requires-certificate-transparency='false'/> + <access allows-arbitrary-loads-in-media="true" allows-arbitrary-loads-in-web-content="true" allows-local-networking="true" minimum-tls-version="TLSv1.0" origin="*" requires-certificate-transparency="false" requires-forward-secrecy="false" /> <allow-navigation href="*" /> <preference name="AndroidPersistentFileLocation" value="Compatibility" /> <preference name="iosPersistentFileLocation" value="Library" /> @@ -96,6 +96,6 @@ <variable name="ANDROID_HOST" value=" " /> <variable name="ANDROID_PATHPREFIX" value="/" /> </plugin> - <engine name="android" spec="~5.1.1" /> - <engine name="ios" spec="~4.3.1" /> + <engine name="android" /> + <engine name="ios" /> </widget> diff --git a/package.json b/package.json index e6b8eac3..60a2d230 100644 --- a/package.json +++ b/package.json @@ -37,13 +37,6 @@ "id": "cordova-sqlite-storage" }, "cordova-plugin-settings-hook", - { - "id": "phonegap-plugin-push", - "locator": "phonegap-plugin-push", - "variables": { - "SENDER_ID": "710936220256" - } - }, "cordova-plugin-file", "cordova-plugin-compat", "cordova-plugin-inappbrowser", @@ -99,15 +92,22 @@ }, "cordova-plugin-photo-library", { - "locator": "https://github.com/hypery2k/cordova-certificate-plugin", - "id": "cordova-plugin-certificates" - }, - { "id": "cordova-plugin-customurlscheme", "locator": "cordova-plugin-customurlscheme", "variables": { "URL_SCHEME": "zmninja" } + }, + { + "id": "phonegap-plugin-push", + "locator": "phonegap-plugin-push", + "variables": { + "SENDER_ID": "710936220256" + } + }, + { + "locator": "https://github.com/hypery2k/cordova-certificate-plugin", + "id": "cordova-plugin-certificates" } ], "cordovaPlatforms": [ |
