diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-02 13:31:30 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-02 13:31:30 +0100 |
| commit | f78754e26c6274f997bbfe0798f47aa86f8f8133 (patch) | |
| tree | b232000eafbb4b143a63b66e2930a1064b59a494 /build-logic/src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt | |
| parent | 5972d8bb6ab2369e298be0e6641d92ab8f1b2f7a (diff) | |
| download | HardenedPass-f78754e26c6274f997bbfe0798f47aa86f8f8133.tar.gz HardenedPass-f78754e26c6274f997bbfe0798f47aa86f8f8133.zip | |
build: drop the nonFree flavor, Sentry and Play Services
The fork targets GrapheneOS and ships only FOSS builds. The nonFree
flavor added Sentry crash reporting, wired to upstream's Sentry project,
and Play Services SMS one-time-code autofill, which needs Google's
servers. Neither is wanted, so remove the flavor dimension entirely:
- Delete app/src/nonFree, the SentryPlugin, the sentry-stub module, the
Sentry and Play Services catalog entries, and the Sentry scope setup
in Application.
- Move the free AutofillSmsActivity stub into main; it keeps the SMS
OTP feature off exactly as the free build did. A ponytail note marks
the FillOtpFromSms paths for later removal.
- SlimTests no longer needs to skip a nonFree variant.
- Workflows and docs use :app:assembleDebug / :app:assembleRelease. A
bare assembleRelease would also verify library modules in release
mode, where ui:compose fails on a pre-existing AppCompat attribute
reference the old flavored task never touched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'build-logic/src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt')
| -rw-r--r-- | build-logic/src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt deleted file mode 100644 index 1503bb9d..00000000 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved. - * SPDX-License-Identifier: GPL-3.0-only - */ - -package app.passwordstore.gradle - -import app.passwordstore.gradle.flavors.FlavorDimensions -import app.passwordstore.gradle.flavors.ProductFlavors -import com.android.build.api.variant.ApplicationAndroidComponentsExtension -import io.sentry.android.gradle.SentryPlugin -import io.sentry.android.gradle.extensions.SentryPluginExtension -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.kotlin.dsl.apply -import org.gradle.kotlin.dsl.configure - -@Suppress("Unused") -class SentryPlugin : Plugin<Project> { - - override fun apply(project: Project) { - project.pluginManager.withPlugin("com.android.application") { - project.extensions.configure<ApplicationAndroidComponentsExtension> { - onVariants(selector().withFlavor(FlavorDimensions.FREE to ProductFlavors.NON_FREE)) { - variant -> - val sentryDsn = project.providers.environmentVariable(SENTRY_DSN_PROPERTY).orElse("") - variant.manifestPlaceholders.put("sentryDsn", sentryDsn.get()) - } - } - project.plugins.apply(SentryPlugin::class) - project.extensions.configure<SentryPluginExtension> { - includeProguardMapping.set( - project.providers.gradleProperty(SENTRY_UPLOAD_MAPPINGS_PROPERTY).isPresent - ) - autoUploadProguardMapping.set( - project.providers.gradleProperty(SENTRY_UPLOAD_MAPPINGS_PROPERTY).isPresent - ) - ignoredBuildTypes.set(setOf("debug")) - ignoredFlavors.set(setOf(ProductFlavors.FREE)) - tracingInstrumentation { enabled.set(false) } - autoInstallation.enabled.set(false) - includeDependenciesReport.set(false) - } - } - } - - private companion object { - - private const val SENTRY_DSN_PROPERTY = "SENTRY_DSN" - private const val SENTRY_UPLOAD_MAPPINGS_PROPERTY = "sentryUploadMappings" - } -} |
