mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 15:50:16 +02:00
Enable minify optimizations for release builds (#1437)
## Description Enables minify & resource shrinking for release builds. This should improve overall performance a bit. It also decreases the apk size by ~15%. Also updates AGP ### Related issues N/A ### Testing Emulator, but needs more testing before a final release ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
086badf2e2
commit
bfb49b80be
6 changed files with 27 additions and 21 deletions
7
.github/workflows/main.yml
vendored
7
.github/workflows/main.yml
vendored
|
|
@ -75,6 +75,13 @@ jobs:
|
|||
run: |
|
||||
echo "SHA256 checksums:"
|
||||
find app/build/outputs/apk -name '*.apk' -print0 | xargs -0 sha256sum
|
||||
- name: Upload mapping files
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: mapping
|
||||
path: |
|
||||
app/build/outputs/**/mapping.txt
|
||||
compression-level: 6
|
||||
- name: Delete ${{ env.TAG_NAME }} tag and release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
|
|
@ -64,6 +64,13 @@ jobs:
|
|||
path: |
|
||||
app/build/outputs/bundle/**/*.aab
|
||||
compression-level: 0
|
||||
- name: Upload mapping files
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: mapping
|
||||
path: |
|
||||
app/build/outputs/**/mapping.txt
|
||||
compression-level: 6
|
||||
- name: Create GitHub release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,8 @@ configure<ApplicationExtension> {
|
|||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro",
|
||||
|
|
@ -105,6 +106,7 @@ configure<ApplicationExtension> {
|
|||
|
||||
debug {
|
||||
isMinifyEnabled = false
|
||||
isShrinkResources = false
|
||||
isDebuggable = true
|
||||
applicationIdSuffix = ".debug"
|
||||
}
|
||||
|
|
|
|||
27
app/proguard-rules.pro
vendored
27
app/proguard-rules.pro
vendored
|
|
@ -1,21 +1,10 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-keep class com.github.damontecres.wholphin.util.mpv.* { *; }
|
||||
|
||||
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
|
||||
-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
|
||||
<fields>;
|
||||
<methods>;
|
||||
}
|
||||
-dontwarn com.google.protobuf.**
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ android.enableAppCompileTimeRClass=true
|
|||
android.usesSdkInManifest.disallowed=true
|
||||
android.uniquePackageNames=true
|
||||
android.dependency.useConstraints=false
|
||||
android.enableR8.fullMode=true
|
||||
android.r8.strictFullModeForKeepRules=true
|
||||
android.r8.optimizedResourceShrinking=true
|
||||
android.builtInKotlin=true
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[versions]
|
||||
aboutLibraries = "14.2.0"
|
||||
acra = "5.13.1"
|
||||
agp = "9.1.1"
|
||||
agp = "9.2.1"
|
||||
auto-service = "1.1.1"
|
||||
autoServiceKsp = "1.2.0"
|
||||
desugar_jdk_libs = "2.1.5"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue