ANDROID: use gradle's auto-align and set debuggable to false for release build

There were issues with manually aligning apks possibly due to upgrading gradle

The manual zipalign even though running with no fail message, would NOT align the apk properly anymore.
Command to manual verify alignment of an apk is:
Android/Sdk/tools/bin/zipalign -c -v 4 release/ScummVM-release-unsigned.apk
This commit is contained in:
antoniou 2020-10-18 13:41:52 +03:00
parent 468d52cbe0
commit 79acea3a18
2 changed files with 9 additions and 3 deletions

View File

@ -37,11 +37,11 @@ $(PATH_BUILD_LIBSCUMMVM): libscummvm.so | $(PATH_BUILD)
$(APK_MAIN): $(PATH_BUILD_GRADLE) $(PATH_BUILD_ASSETS) $(PATH_BUILD_LIBSCUMMVM) | $(PATH_BUILD)
(cd $(PATH_BUILD); ./gradlew assembleDebug)
$(CP) $(PATH_BUILD)/build/outputs/apk/debug/ScummVM-debug.apk $@
$(CP) $(PATH_BUILD)/build/outputs/apk/debug/$(APK_MAIN) $@
$(APK_MAIN_RELEASE): $(PATH_BUILD_GRADLE) $(PATH_BUILD_ASSETS) $(PATH_BUILD_LIBSCUMMVM) | $(PATH_BUILD)
(cd $(PATH_BUILD); ./gradlew build)
$(CP) $(PATH_BUILD)/build/outputs/apk/release/ScummVM-release-unsigned.apk $@
(cd $(PATH_BUILD); ./gradlew assembleRelease)
$(CP) $(PATH_BUILD)/build/outputs/apk/release/$(APK_MAIN_RELEASE) $@
all: $(APK_MAIN)

View File

@ -55,8 +55,14 @@ android {
}
buildTypes {
debug{
debuggable true
}
release {
debuggable false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
}
sourceSets {