SDL: fixed build scripts

This commit is contained in:
pelya
2020-04-17 00:52:53 +03:00
parent 70f933c12a
commit 6b7505dc1f
5 changed files with 17 additions and 10 deletions

View File

@@ -7,16 +7,19 @@ PASS=
APPNAME=`grep AppName AndroidAppSettings.cfg | sed 's/.*=//' | tr -d '"' | tr " '/" '---'`
APPVER=`grep AppVersionName AndroidAppSettings.cfg | sed 's/.*=//' | tr -d '"' | tr " '/" '---'`
# Fix Gradle compilation error
[ -z "$ANDROID_NDK_HOME" ] && export ANDROID_NDK_HOME="`which ndk-build | sed 's@/ndk-build@@'`"
cd project
./gradlew bundleRelease || exit 1
../copyAssets.sh pack-binaries-bundle app/build/outputs/bundle/release/app.aab
../copyAssets.sh pack-binaries-bundle app/build/outputs/bundle/release/app-release.aab
cd app/build/outputs/bundle/release || exit 1
# Remove old certificate
cp -f app.aab ../../../../../../$APPNAME-$APPVER.aab || exit 1
cp -f app-release.aab ../../../../../../$APPNAME-$APPVER.aab || exit 1
# Sign with the new certificate
echo Using keystore $ANDROID_UPLOAD_KEYSTORE_FILE and alias $ANDROID_UPLOAD_KEYSTORE_ALIAS
stty -echo