fix(build): add default value for Sentry DSN

This commit is contained in:
Harsh Shandilya 2023-06-15 13:46:04 +05:30
parent ea7ba60511
commit e4b6c89cc6
No known key found for this signature in database

View file

@ -18,10 +18,8 @@ class SentryPlugin : Plugin<Project> {
project.extensions.configure<ApplicationAndroidComponentsExtension> {
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)