From 1b573ec2964b301d8a66301573d4fe11cbaa76ac Mon Sep 17 00:00:00 2001 From: Fankesyooni Date: Sat, 19 Mar 2022 20:33:30 +0800 Subject: [PATCH] Merge R8 Rules --- app/build.gradle | 8 ++++++++ app/proguard-rules.pro | 18 +++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 31cff9d..726398f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,6 +25,14 @@ android { versionCode rootProject.ext.appVersionCode versionName rootProject.ext.appVersionName + kotlinOptions { + freeCompilerArgs = [ + '-Xno-param-assertions', + '-Xno-call-assertions', + '-Xno-receiver-assertions' + ] + } + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 786522e..fb2de18 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -27,22 +27,26 @@ -dontoptimize -verbose -overloadaggressively --repackageclasses o -allowaccessmodification -adaptclassstrings -adaptresourcefilenames -adaptresourcefilecontents -#-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* --renamesourcefileattribute H +-renamesourcefileattribute P -keepattributes SourceFile,LineNumberTable --keep class android.support** --keep class androidx** - -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgentHelper --keep public class * extends android.preference.Preference \ No newline at end of file +-keep public class * extends android.preference.Preference + +-assumenosideeffects class kotlin.jvm.internal.Intrinsics { + public static *** throwUninitializedProperty(...); + public static *** throwUninitializedPropertyAccessException(...); +} + +-keepclassmembers class * implements androidx.viewbinding.ViewBinding { + *** inflate(android.view.LayoutInflater); +} \ No newline at end of file