diff --git a/mastodon/build.gradle b/mastodon/build.gradle index ae2820599..83991b6fe 100644 --- a/mastodon/build.gradle +++ b/mastodon/build.gradle @@ -23,8 +23,8 @@ android { buildTypes { release { -// minifyEnabled true -// shrinkResources true + minifyEnabled true + shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug{ @@ -32,16 +32,8 @@ android { versionNameSuffix '-debug' applicationIdSuffix '.debug' } - githubRelease{ - initWith release - } - playRelease{ - initWith release - // TODO: fix proguard rules and re-enable these -// minifyEnabled true -// shrinkResources true - versionNameSuffix '-play' - } + githubRelease { initWith release } + playRelease { initWith release } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 diff --git a/mastodon/proguard-rules.pro b/mastodon/proguard-rules.pro index cf75550f0..f12799a6f 100644 --- a/mastodon/proguard-rules.pro +++ b/mastodon/proguard-rules.pro @@ -30,6 +30,9 @@ *; } +# i don't know how proguard works +-keep class org.joinmastodon.android.** { *; } + # Keep all enums for debugging purposes -keepnames public enum * { *; @@ -79,3 +82,6 @@ -keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken ##---------------End: proguard configuration for Gson ---------- + + +-dontobfuscate