From a2157ae618918a1043226b8bf957f37aa9f3022b Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 15 Apr 2023 22:59:57 +0530 Subject: [PATCH] feat: rework Sentry disabling logic for benchmark builds --- .github/workflows/baseline-profile.yml | 3 --- android/src/benchmark/AndroidManifest.xml | 7 +++++++ .../main/kotlin/dev/msfjarvis/claw/gradle/SentryPlugin.kt | 1 - 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 android/src/benchmark/AndroidManifest.xml diff --git a/.github/workflows/baseline-profile.yml b/.github/workflows/baseline-profile.yml index 9665d4df..78dd6908 100644 --- a/.github/workflows/baseline-profile.yml +++ b/.github/workflows/baseline-profile.yml @@ -9,7 +9,6 @@ on: env: AVD_API_LEVEL: 31 AVD_ARCH: x86_64 - CI_BENCHMARK: true jobs: baseline-profile: @@ -62,8 +61,6 @@ jobs: # This allows us to build most of what we need without the emulator running # and using resources - name: Build app and benchmark - env: - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} run: ./gradlew :benchmark:assembleBenchmark :android:assembleBenchmark # Now use reactivecircus/android-emulator-runner to spin up an emulator. We're gonna use it again diff --git a/android/src/benchmark/AndroidManifest.xml b/android/src/benchmark/AndroidManifest.xml new file mode 100644 index 00000000..2ae27210 --- /dev/null +++ b/android/src/benchmark/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/SentryPlugin.kt b/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/SentryPlugin.kt index 14d5d7f8..ede6e80d 100644 --- a/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/SentryPlugin.kt +++ b/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/SentryPlugin.kt @@ -21,7 +21,6 @@ import org.gradle.kotlin.dsl.getByType class SentryPlugin : Plugin { override fun apply(project: Project) { - if (project.providers.environmentVariable("CI_BENCHMARK").isPresent) return project.pluginManager.withPlugin("com.android.application") { val catalog = project.extensions.getByType() val libs = catalog.named("libs")