From 7d2e51f141529dc906d4681ba058731bc02d4265 Mon Sep 17 00:00:00 2001 From: Matthieu <24-artectrex@users.noreply.shinice.net> Date: Fri, 24 Jun 2022 18:11:29 +0200 Subject: [PATCH] Hotfix release: fix creation activity crashes --- app/build.gradle | 4 ++-- app/proguard-rules.pro | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 03837711..cc9b826a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -22,13 +22,13 @@ android { } kotlinOptions { jvmTarget = "1.8" - freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"] + freeCompilerArgs += ["-opt-in=kotlin.RequiresOptIn"] } defaultConfig { applicationId "org.pixeldroid.app" minSdkVersion 23 targetSdkVersion 32 - versionCode 13 + versionCode 14 versionName "1.0.beta" + versionCode testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 5a817e2b..5eb8f3e4 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -5,16 +5,23 @@ -optimizations !code/simplification/cast,!field/*,!class/merging/* -optimizationpasses 6 -allowaccessmodification --dontpreverify + +# Don't obfuscate because it makes traces useless +-dontobfuscate -dontusemixedcaseclassnames --dontskipnonpubliclibraryclasses -keepattributes *Annotation* # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native -keepclasseswithmembernames class * { native ; } + +# keep ViewModel constructors to make ViewModelFactories work +-keepclassmembers public class * extends androidx.lifecycle.ViewModel { + public (...); +} + # keep setters in Views so that animations can still work. # see http://proguard.sourceforge.net/manual/examples.html#beans -keepclassmembers public class * extends android.view.View { @@ -69,7 +76,14 @@ # remove some kotlin overhead -assumenosideeffects class kotlin.jvm.internal.Intrinsics { + static void checkNotNull(java.lang.Object); + static void checkNotNull(java.lang.Object, java.lang.String); static void checkParameterIsNotNull(java.lang.Object, java.lang.String); + static void checkParameterIsNotNull(java.lang.Object, java.lang.String); + static void checkNotNullParameter(java.lang.Object, java.lang.String); static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String); + static void checkNotNullExpressionValue(java.lang.Object, java.lang.String); + static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String); + static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String, java.lang.String); static void throwUninitializedPropertyAccessException(java.lang.String); } \ No newline at end of file