From dae811b969f6d6462158a47d11e2797c8f4e133a Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Wed, 18 Dec 2024 06:48:02 +0100 Subject: [PATCH] refactor: Configure Sentry --- .gitignore | 20 +++++++++++--------- app/build.gradle.kts | 5 +++-- app/proguard-rules.pro | 5 ++++- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index f38d8f5f2..bb45900db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,15 @@ -*.iml -.gradle -/local.properties -/.idea +.cxx .DS_Store -build/ -/captures .externalNativeBuild -.cxx -local.properties -*.apk +.gradle +.kotlin/sessions *.aab +*.apk +*.iml env.properties +local.properties +build/ +/.idea +/app/release/baselineProfiles +/captures +/local.properties diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b6e880afd..f2f59e121 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -17,7 +17,7 @@ val sharedJavaVersion: JavaVersion by rootProject.extra val envProperties = loadProperties("env.properties") val sentryAuthToken = envProperties.getProperty("sentryAuthToken").takeIf { it.isNotEmpty() } - ?: error("The property must be defined and not empty") + ?: error("The `sentryAuthToken` property in `env.properties` must be defined and not empty (see `env.example.properties`).") android { namespace = "com.infomaniak.swisstransfer" @@ -49,7 +49,8 @@ android { buildTypes { release { - isMinifyEnabled = false + isMinifyEnabled = true + isShrinkResources = true proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") } } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb4348..96356f816 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -18,4 +18,7 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +# The TransferTypeUi class is removed when minifying, we don't want that. +-keep class com.infomaniak.swisstransfer.ui.screen.newtransfer.importfiles.components.TransferTypeUi{*;}