From e9af25f32d72a2146796c9eea3224c1d9c882ce9 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 4 Mar 2017 07:19:57 -0500 Subject: [PATCH] #491 - build process and config updated --- build_android.sh | 34 +++++++++++++++++++--------------- config.xml | 6 +++--- package.json | 22 +++++++++++----------- 3 files changed, 33 insertions(+), 29 deletions(-) diff --git a/build_android.sh b/build_android.sh index 9d91fc92e..42bb954e1 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 - diff --git a/config.xml b/config.xml index 93aa99198..0bd806e82 100644 --- a/config.xml +++ b/config.xml @@ -9,7 +9,7 @@ - + @@ -96,6 +96,6 @@ - - + + diff --git a/package.json b/package.json index e6b8eac3c..60a2d2303 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", @@ -98,16 +91,23 @@ "id": "cordova-library-helper" }, "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": [