diff --git a/vector/build.gradle b/vector/build.gradle index 1eac3106ea..b49cd14b77 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -192,8 +192,14 @@ android { resValue "bool", "debug_mode", "false" buildConfigField "boolean", "LOW_PRIVACY_LOG_ENABLE", "false" - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + + postprocessing { + removeUnusedCode true + removeUnusedResources true + obfuscate false + optimizeCode true + proguardFiles 'proguard-rules.pro' + } } } diff --git a/vector/proguard-rules.pro b/vector/proguard-rules.pro index f1b424510d..56d3b95510 100644 --- a/vector/proguard-rules.pro +++ b/vector/proguard-rules.pro @@ -19,3 +19,5 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile + +-keep class im.vector.riotx.features.** { *; } \ No newline at end of file diff --git a/vector/src/main/java/im/vector/riotx/features/rageshake/VectorFileLogger.kt b/vector/src/main/java/im/vector/riotx/features/rageshake/VectorFileLogger.kt index bcc48fb96c..d4ad4efb6f 100644 --- a/vector/src/main/java/im/vector/riotx/features/rageshake/VectorFileLogger.kt +++ b/vector/src/main/java/im/vector/riotx/features/rageshake/VectorFileLogger.kt @@ -39,7 +39,7 @@ private const val SIZE_20MB = 20 * 1024 * 1024 private const val SIZE_50MB = 50 * 1024 * 1024 @Singleton -class VectorFileLogger @Inject constructor(val context: Context, private val vectorPreferences: VectorPreferences) : Timber.DebugTree() { +class VectorFileLogger @Inject constructor(val context: Context, private val vectorPreferences: VectorPreferences) : Timber.Tree() { private val maxLogSizeByte: Int private val logRotationCount: Int