feat: rework Sentry disabling logic for benchmark builds

This commit is contained in:
Harsh Shandilya 2023-04-15 22:59:57 +05:30
parent 8b7bcaa92f
commit a2157ae618
No known key found for this signature in database
3 changed files with 7 additions and 4 deletions

View file

@ -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

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<!-- Required: set your sentry.io project identifier (DSN) -->
<meta-data android:name="io.sentry.dsn" android:value="${sentryDsn}" />
</application>
</manifest>

View file

@ -21,7 +21,6 @@ import org.gradle.kotlin.dsl.getByType
class SentryPlugin : Plugin<Project> {
override fun apply(project: Project) {
if (project.providers.environmentVariable("CI_BENCHMARK").isPresent) return
project.pluginManager.withPlugin("com.android.application") {
val catalog = project.extensions.getByType<VersionCatalogsExtension>()
val libs = catalog.named("libs")