summaryrefslogtreecommitdiffstats
path: root/build-logic
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-02 13:31:30 +0100
committerDanilo M. <danix@danix.xyz>2026-11-02 13:31:30 +0100
commitf78754e26c6274f997bbfe0798f47aa86f8f8133 (patch)
treeb232000eafbb4b143a63b66e2930a1064b59a494 /build-logic
parent5972d8bb6ab2369e298be0e6641d92ab8f1b2f7a (diff)
downloadHardenedPass-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')
-rw-r--r--build-logic/build.gradle.kts5
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt8
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/SentryPlugin.kt52
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/flavors/ProductFlavors.kt15
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/flavors/SlimTests.kt16
5 files changed, 5 insertions, 91 deletions
diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts
index dd9c0c8b..2d7700f0 100644
--- a/build-logic/build.gradle.kts
+++ b/build-logic/build.gradle.kts
@@ -45,10 +45,6 @@ gradlePlugin {
id = "com.github.android-password-store.rename-artifacts"
implementationClass = "app.passwordstore.gradle.RenameArtifactsPlugin"
}
- register("sentry") {
- id = "com.github.android-password-store.sentry"
- implementationClass = "app.passwordstore.gradle.SentryPlugin"
- }
register("spotless") {
id = "com.github.android-password-store.spotless"
implementationClass = "app.passwordstore.gradle.SpotlessPlugin"
@@ -77,7 +73,6 @@ dependencies {
implementation(libs.build.moshi.kotlin)
implementation(libs.build.okhttp)
implementation(libs.build.semver)
- implementation(libs.build.sentry)
implementation(libs.build.spotless)
implementation(libs.build.vcu)
implementation(libs.kotlinx.coroutines.core)
diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt
index 9b43cbe1..6d38d1fc 100644
--- a/build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt
+++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt
@@ -7,8 +7,6 @@
package app.passwordstore.gradle
-import app.passwordstore.gradle.flavors.FlavorDimensions
-import app.passwordstore.gradle.flavors.ProductFlavors
import app.passwordstore.gradle.signing.configureBuildSigning
import com.android.build.api.dsl.ApplicationExtension
import com.android.build.gradle.AppPlugin
@@ -55,12 +53,6 @@ class ApplicationPlugin : Plugin<Project> {
}
}
- flavorDimensions.add(FlavorDimensions.FREE)
- productFlavors {
- register(ProductFlavors.FREE) {}
- register(ProductFlavors.NON_FREE) {}
- }
-
project.configureBuildSigning()
}
}
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"
- }
-}
diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/flavors/ProductFlavors.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/flavors/ProductFlavors.kt
deleted file mode 100644
index 2206c4c8..00000000
--- a/build-logic/src/main/kotlin/app/passwordstore/gradle/flavors/ProductFlavors.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved.
- * SPDX-License-Identifier: GPL-3.0-only
- */
-
-package app.passwordstore.gradle.flavors
-
-object FlavorDimensions {
- const val FREE = "free"
-}
-
-object ProductFlavors {
- const val FREE = "free"
- const val NON_FREE = "nonFree"
-}
diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/flavors/SlimTests.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/flavors/SlimTests.kt
index 0ed72afa..3ba2acf8 100644
--- a/build-logic/src/main/kotlin/app/passwordstore/gradle/flavors/SlimTests.kt
+++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/flavors/SlimTests.kt
@@ -12,12 +12,11 @@ import org.gradle.api.Project
import org.gradle.kotlin.dsl.findByType
/**
- * When the "slimTests" project property is provided, disable the unit test tasks on `release` build
- * type and `nonFree` product flavor to avoid running the same tests repeatedly in different build
- * variants.
+ * When the "slimTests" project property is provided, disable the unit test tasks on the `release`
+ * build type to avoid running the same tests twice.
*
- * Examples: `./gradlew test -PslimTests` will run unit tests for `nonFreeDebug` and `debug` build
- * variants in Android App and Library projects, and all tests in JVM projects.
+ * Example: `./gradlew test -PslimTests` runs unit tests for the `debug` variant in Android App and
+ * Library projects, and all tests in JVM projects.
*/
@Suppress("UnstableApiUsage")
internal fun Project.configureSlimTests() {
@@ -30,16 +29,11 @@ internal fun Project.configureSlimTests() {
}
}
- // Disable unit test tasks on the release build type and free flavor for Android Application
- // projects.
+ // Disable unit test tasks on the release build type for Android Application projects.
extensions.findByType<ApplicationAndroidComponentsExtension>()?.run {
beforeVariants(selector().withBuildType(BUILD_TYPE_RELEASE)) {
(it as HasUnitTestBuilder).enableUnitTest = false
}
- beforeVariants(selector().withFlavor(FlavorDimensions.FREE to ProductFlavors.NON_FREE)) {
- (it as HasUnitTestBuilder).enableUnitTest = false
- it.androidTest.enable = false
- }
}
}
}