diff --git a/.github/workflows/ci_checks.yml b/.github/workflows/ci_checks.yml index e6b41326d37..0d525ee50e5 100644 --- a/.github/workflows/ci_checks.yml +++ b/.github/workflows/ci_checks.yml @@ -311,6 +311,7 @@ jobs: ./gradlew \ -PrunProguard=true \ -PdefaultProguardFile=proguard-android.txt \ + -PsentryUploadProguard=false \ bundle${{ matrix.buildType }}Release verify_room_schemas: diff --git a/CHANGELOG.md b/CHANGELOG.md index 769c404bb94..1739bbe73c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Bump asm to v9.7.1 - Bump AndroidX CameraX to v1.4.0 - Bump AndroidX Annotation to v1.9.1 +- Upload generated mapping file to Sentry ### Fixes diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 601dc747b2c..e1eda4a84c7 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -18,8 +18,17 @@ plugins { } sentry { + val sentryOrg: String by project + val sentryProject: String by project + val sentryAuthToken: String by project + val sentryUploadProguard: String by project + + org = sentryOrg + projectName = sentryProject + authToken = sentryAuthToken + includeProguardMapping.set(true) - autoUploadProguardMapping.set(false) + autoUploadProguardMapping.set(sentryUploadProguard.toBooleanStrict()) // We are using our own instrumentation tooling for Room queries // Look at [ADR 013: SQL Performance Profiling (v2)] @@ -231,27 +240,7 @@ android { } } - // We don"t obfuscate (only minify) using proguard. Gradle plugin 3.2.0 (and greater?) generates - // an empty mappings.txt file. This caused an issue where the CI deploy to play store task tries - // to upload the empty mapping file, which causes the Play Store api to complain. - val deleteProguardMappings = tasks.create("deleteProguardMappings") { - delete(fileTree(layout.buildDirectory).matching { - include("outputs/mapping/**/mapping.txt") - }) - } - afterEvaluate { - val assembleReleaseTasks = setOf( - "assembleStagingRelease", - "assembleSandboxRelease", - "assembleProductionRelease", - "assembleSecurityRelease" - ) - - assembleReleaseTasks.forEach { buildType -> - tasks.findByName(buildType)?.finalizedBy(deleteProguardMappings) - } - val kspTasks = mapOf( "kspQaDebugKotlin" to "qaDebug", "kspSandboxReleaseKotlin" to "sandboxRelease", diff --git a/gradle.properties b/gradle.properties index 80641b3f82c..5d3db2d6957 100644 --- a/gradle.properties +++ b/gradle.properties @@ -37,6 +37,10 @@ androidNdkVersion=21.3.6528147 # Sentry config sentryDsn=do_not_change_here sentryEnvironment=dev +sentryOrg=do_not_change_here +sentryProject=do_not_change_here +sentryAuthToken=do_not_change_here +sentryUploadProguard=true # App behaviour disableScreenshot=false allowRootedDevice=true