Skip to content

Commit

Permalink
Merge pull request #994 from a-pavlov/master
Browse files Browse the repository at this point in the history
Make build_android.sh script more user friendly
  • Loading branch information
pliablepixels committed Oct 12, 2020
2 parents a8240ef + 4d85b13 commit a110f83
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion build_android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ build_release() {
exit
fi

if [[ -z "${ANDROID_SDK_ROOT}" ]]; then
echo "ANDROID_SDK_ROOT must be set for release build"
exit 1
fi


BUILD_MODE="native"
rm -rf release_files 2>/dev/null
mkdir release_files
Expand Down Expand Up @@ -58,7 +64,13 @@ build_release() {

cd release_files/
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../platforms/android/zmNinja.keystore android-release-unsigned.apk zmNinja
~/Library/Android/sdk/build-tools/${SDK_VERSION}/zipalign -v 4 android-release-unsigned.apk zmNinja.apk
ret=$?
if [ $ret -ne 0 ]; then
echo "Unable to sign jar, please fix the error above"
exit 1
fi

$ANDROID_SDK_ROOT/build-tools/${SDK_VERSION}/zipalign -v 4 android-release-unsigned.apk zmNinja.apk
rm -f android-release-unsigned.apk
cd ..

Expand Down

0 comments on commit a110f83

Please sign in to comment.