summaryrefslogtreecommitdiff
path: root/build_android.sh
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@users.noreply.github.com>2018-10-14 15:00:02 -0400
committerGitHub <noreply@github.com>2018-10-14 15:00:02 -0400
commit3cd1ff34c0cd8412ebe07d4ba5614ec938b72456 (patch)
treeb256e275147ee495721bedeaaafb1a65f8aef98c /build_android.sh
parentffbacb34a6a654eb1124c627320bc75131636ff7 (diff)
parent863e507613e33cc66022ba3639f7e1a5b8eb7c96 (diff)
Merge pull request #709 from pliablepixels/webview
WKWebView migration resolutions and other stuff
Diffstat (limited to 'build_android.sh')
-rwxr-xr-xbuild_android.sh60
1 files changed, 12 insertions, 48 deletions
diff --git a/build_android.sh b/build_android.sh
index d084d8c4..0eb723c5 100755
--- a/build_android.sh
+++ b/build_android.sh
@@ -13,8 +13,8 @@ if [ ! -f "$NINJAKEYSTORE" ]; then
exit
fi
+rm -f release_files 2>/dev/null
mkdir release_files
-rm -f release_files/*
# no arguments - build both
# 1 == build crosswalk only
@@ -30,45 +30,8 @@ if [ "$1" = "2" ]; then
echo "only building native view (5+)"
fi
-############ Crosswalk build ####################################
-if [ "$BUILD_MODE" = "xwalk" ] || [ "$BUILD_MODE" = "all" ]; then
-
- echo "${ver_pre5}: Building Release mode for Xwalk android..."
- echo "--------------------------------------------"
- echo "Removing android and re-adding..."
- cordova platform remove android
- cordova platform add android@6.3.0
- cordova plugin remove cordova-plugin-crosswalk-webview --nosave
- echo "Adding crosswalk..."
- #cordova plugin add cordova-plugin-crosswalk-webview
- cordova plugin add cordova-plugin-crosswalk-webview@2.2.0 --variable XWALK_MODE="lite" --variable "XWALK_VERSION"="17.46.459.1" --nosave
- #cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="22+"
- #ionic plugin add cordova-plugin-crosswalk-webview
- # crosswalk handles SSL certificate handling in a different way
- # need to switch plugins
- echo "Adding crosswalk cert plugin..."
- cordova plugin remove cordova-plugin-certificates --nosave
- cordova plugin add cordova-plugin-crosswalk-certificate-pp-fork --nosave
- cp "$NINJAKEYSTORE" platforms/android/
- echo "Building XWALK ..."
- #cordova build android --release -- --targetSdkVersion=23
- cordova build android --release -- --gradleArg=-PcdvVersionCode=${ver_pre5}
-
- # copy builds to my release directory
- cp platforms/android/build/outputs/apk/android-x86-release-unsigned.apk release_files/
- cp platforms/android/build/outputs/apk/android-armv7-release-unsigned.apk release_files/
- echo "Copied files to release_files"
-
- # sign them
- cd release_files/
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../platforms/android/zmNinja.keystore android-armv7-release-unsigned.apk zmNinja
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../platforms/android/zmNinja.keystore android-x86-release-unsigned.apk zmNinja
- ~/Library/Android/sdk/build-tools/25.0.2/zipalign -v 4 android-x86-release-unsigned.apk zmNinja-x86-pre5.apk
- ~/Library/Android/sdk/build-tools/25.0.2/zipalign -v 4 android-armv7-release-unsigned.apk zmNinja-arm-pre5.apk
- rm -f android-x86-release-unsigned.apk android-armv7-release-unsigned.apk
- cd ..
-fi
-
+echo "----------> Only building native. Not building crosswalk anymore due to compatibility issues <----------------------"
+BUILD_MODE="native"
############ Native web view build ###############################
if [ "$BUILD_MODE" = "native" ] || [ "$BUILD_MODE" = "all" ]; then
@@ -76,24 +39,25 @@ if [ "$BUILD_MODE" = "native" ] || [ "$BUILD_MODE" = "all" ]; then
echo "${ver}: Building Release mode for android 5+..."
echo "--------------------------------------------"
- echo "Removing android and re-adding..."
- cordova platform remove android
- cordova platform add android@6.3.0
+# No longger needed as we are not supporting Xwalk
+# echo "Removing android and re-adding..."
+# cordova platform remove android
+# cordova platform add android@6.4.0
#clean up past build stuff
- echo "Adding default browser..."
- cordova plugin remove cordova-plugin-crosswalk-webview
+# echo "Adding default browser..."
+# cordova plugin remove cordova-plugin-crosswalk-webview
# use the right plugin for SSL certificate mgmt
- cordova plugin remove cordova-plugin-crosswalk-certificate-pp-fork
- cordova plugin add cordova-plugin-certificates
+# cordova plugin remove cordova-plugin-crosswalk-certificate-pp-fork
+# cordova plugin add cordova-plugin-certificates
cp "$NINJAKEYSTORE" platforms/android/
# Make sure native builds are only deployed in devices >= Android 5
cordova build android --release -- --minSdkVersion=21 --versionCode=${ver}
# copy build to release folder and sign
- cp platforms/android/build/outputs/apk/android-release-unsigned.apk release_files/
+ cp platforms/android/build/outputs/apk/release/android-release-unsigned.apk release_files/
echo "Copied files to release_files"
cd release_files/