[Scummvm-git-logs] scummvm master -> 79acea3a189c4e2a67b4a6e6bc24d8ac7d81b8e0

antoniou79 a.antoniou79 at gmail.com
Sun Oct 18 10:42:54 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

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


Commit: 79acea3a189c4e2a67b4a6e6bc24d8ac7d81b8e0
    https://github.com/scummvm/scummvm/commit/79acea3a189c4e2a67b4a6e6bc24d8ac7d81b8e0
Author: antoniou (a.antoniou79 at gmail.com)
Date: 2020-10-18T13:42:44+03:00

Commit Message:
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

Changed paths:
    backends/platform/android/android.mk
    dists/android/build.gradle


diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk
index fed9aba212..341004d19f 100644
--- a/backends/platform/android/android.mk
+++ b/backends/platform/android/android.mk
@@ -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)
 
diff --git a/dists/android/build.gradle b/dists/android/build.gradle
index 04ce793c36..6ee9214edc 100644
--- a/dists/android/build.gradle
+++ b/dists/android/build.gradle
@@ -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 {




More information about the Scummvm-git-logs mailing list