fix(build): add default value for Sentry DSN
This commit is contained in:
parent
ea7ba60511
commit
e4b6c89cc6
1 changed files with 2 additions and 4 deletions
|
@ -18,10 +18,8 @@ class SentryPlugin : Plugin<Project> {
|
||||||
project.extensions.configure<ApplicationAndroidComponentsExtension> {
|
project.extensions.configure<ApplicationAndroidComponentsExtension> {
|
||||||
onVariants(selector().withFlavor(FlavorDimensions.FREE to ProductFlavors.NON_FREE)) {
|
onVariants(selector().withFlavor(FlavorDimensions.FREE to ProductFlavors.NON_FREE)) {
|
||||||
variant ->
|
variant ->
|
||||||
val sentryDsn = project.providers.environmentVariable(SENTRY_DSN_PROPERTY)
|
val sentryDsn = project.providers.environmentVariable(SENTRY_DSN_PROPERTY).orElse("")
|
||||||
if (sentryDsn.isPresent) {
|
variant.manifestPlaceholders.put("sentryDsn", sentryDsn.get())
|
||||||
variant.manifestPlaceholders.put("sentryDsn", sentryDsn.get())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
project.plugins.apply(SentryPlugin::class)
|
project.plugins.apply(SentryPlugin::class)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue