Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make build_android.sh script more user friendly #994

Merged
merged 2 commits into from
Oct 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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