From e4b6c89cc6df1e80adf6ae88291adbbefd08d720 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 15 Jun 2023 13:46:04 +0530 Subject: fix(build): add default value for Sentry DSN --- .../src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'build-logic') diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt index 6bcbdd85..589b248c 100644 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt +++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt @@ -18,10 +18,8 @@ class SentryPlugin : Plugin { project.extensions.configure { onVariants(selector().withFlavor(FlavorDimensions.FREE to ProductFlavors.NON_FREE)) { variant -> - val sentryDsn = project.providers.environmentVariable(SENTRY_DSN_PROPERTY) - if (sentryDsn.isPresent) { - variant.manifestPlaceholders.put("sentryDsn", sentryDsn.get()) - } + val sentryDsn = project.providers.environmentVariable(SENTRY_DSN_PROPERTY).orElse("") + variant.manifestPlaceholders.put("sentryDsn", sentryDsn.get()) } } project.plugins.apply(SentryPlugin::class) -- cgit v1.2.3