From 758e3210a36a803410cf698c4085b5be99e8aba8 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 25 Apr 2022 11:33:35 +0530 Subject: [PATCH] Allow sentry mapping upload task to be configured at build-time (#1870) --- .github/workflows/deploy_snapshot.yml | 2 +- .../com.github.android-password-store.sentry.gradle.kts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_snapshot.yml b/.github/workflows/deploy_snapshot.yml index 5356f2201..0fce90f93 100644 --- a/.github/workflows/deploy_snapshot.yml +++ b/.github/workflows/deploy_snapshot.yml @@ -35,7 +35,7 @@ jobs: SENTRY_DSN: ${{ secrets.SENTRY_DSN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} with: - arguments: --no-configuration-cache collectFreeReleaseApks collectNonFreeReleaseApks + arguments: --no-configuration-cache collectFreeReleaseApks collectNonFreeReleaseApks -PsentryUploadMappings - name: Clean secrets run: scripts/signing-cleanup.sh diff --git a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.sentry.gradle.kts b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.sentry.gradle.kts index 0407d8087..febfce141 100644 --- a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.sentry.gradle.kts +++ b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.sentry.gradle.kts @@ -10,6 +10,7 @@ plugins { } val SENTRY_DSN_PROPERTY = "SENTRY_DSN" +val SENTRY_UPLOAD_MAPPINGS_PROPERTY = "sentryUploadMappings" android { androidComponents { @@ -23,7 +24,9 @@ android { } sentry { - autoUploadProguardMapping.set(true) + autoUploadProguardMapping.set( + project.providers.gradleProperty(SENTRY_UPLOAD_MAPPINGS_PROPERTY).isPresent + ) ignoredBuildTypes.set(setOf("debug")) ignoredFlavors.set(setOf(ProductFlavors.FREE)) tracingInstrumentation {