mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-11 16:15:24 -04:00
chore(r8): clean up ProGuard rules and enable Compose Hot Reload (#5139)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -171,8 +171,6 @@ configure<ApplicationExtension> {
|
||||
} else {
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
isDebuggable = false
|
||||
}
|
||||
}
|
||||
|
||||
14
app/proguard-rules.pro
vendored
14
app/proguard-rules.pro
vendored
@@ -13,6 +13,10 @@
|
||||
# Open-source — no need to obfuscate
|
||||
-dontobfuscate
|
||||
|
||||
# Dump the full merged R8 configuration (app rules + all library consumer rules)
|
||||
# for auditing. Inspect this file after a release build to see what libraries inject.
|
||||
-printconfiguration build/outputs/mapping/r8-merged-config.txt
|
||||
|
||||
# ---- Networking (transitive references from Ktor) ---------------------------
|
||||
|
||||
-dontwarn org.conscrypt.**
|
||||
@@ -43,13 +47,3 @@
|
||||
# R8 exception-class merging.
|
||||
-keep class org.jetbrains.compose.resources.** { *; }
|
||||
-keep class org.meshtastic.core.resources.** { *; }
|
||||
|
||||
# Compose Animation: prevent R8 from merging animation spec classes (easing
|
||||
# curves, transition specs, Animatable internals) which can cause animations to
|
||||
# silently snap in release builds.
|
||||
#
|
||||
# We use a full -keep here without allowshrinking/allowobfuscation. While it
|
||||
# might keep some unused transition APIs, R8's aggressive shrinking is known
|
||||
# to incorrectly remove internal states or merging empty transitions (like None)
|
||||
# causing AnimatedVisibility and others to snap.
|
||||
-keep class androidx.compose.animation.** { *; }
|
||||
|
||||
6
desktop/proguard-rules.pro
vendored
6
desktop/proguard-rules.pro
vendored
@@ -147,12 +147,6 @@
|
||||
-keep class org.jetbrains.compose.resources.** { *; }
|
||||
-keep class org.meshtastic.core.resources.** { *; }
|
||||
|
||||
# ---- Compose Animation (anti-merge) ----------------------------------------
|
||||
|
||||
# Prevent ProGuard from merging animation spec class hierarchies (same issue
|
||||
# as R8 on Android). We use a full keep to prevent incorrect tree-shaking
|
||||
# of internal transitions.
|
||||
-keep class androidx.compose.animation.** { *; }
|
||||
|
||||
# ---- AboutLibraries ---------------------------------------------------------
|
||||
|
||||
|
||||
@@ -29,3 +29,4 @@ org.gradle.jvmargs=-Xmx8g -XX:+UseParallelGC -XX:MaxMetaspaceSize=2g -XX:+HeapDu
|
||||
org.gradle.parallel=true
|
||||
org.gradle.vfs.watch=true
|
||||
org.gradle.welcome=never
|
||||
compose.hot.reload=true
|
||||
|
||||
Reference in New Issue
Block a user