diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-06 10:13:12 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-06 10:13:12 +0100 |
| commit | a92aa1a00746e4963bffa05cc4abe450e919bb38 (patch) | |
| tree | ac32b224a99675dff9211359011f69b545609c92 | |
| parent | 32755425f0f1a7c29acc38e8f93da389496052ea (diff) | |
| download | HardenedPass-a92aa1a00746e4963bffa05cc4abe450e919bb38.tar.gz HardenedPass-a92aa1a00746e4963bffa05cc4abe450e919bb38.zip | |
fix(build): keep debug features out of release builds
GitHub Actions always sets GITHUB_WORKFLOW, so every release APK built by CI turned ENABLE_DEBUG_FEATURES on: debug logcat logging and the strict VM policy. Nothing sets SNAPSHOT any more, so release is simply false. The debug logging preference still works.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | CHANGELOG.md | 6 | ||||
| -rw-r--r-- | build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt | 10 |
2 files changed, 7 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ec067db..aadd90bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [Unreleased] + +### Fixed + +- Release builds made by CI no longer run with debug logging and the strict VM policy on + ## [0.3.2] - 2026-11-05 ### Changed 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 47409d11..b6332b6a 100644 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt +++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt @@ -48,7 +48,7 @@ class ApplicationPlugin : Plugin<Project> { "proguard-rules-missing-classes.pro", ) ) - buildConfigField("boolean", "ENABLE_DEBUG_FEATURES", "${project.isSnapshot()}") + buildConfigField("boolean", "ENABLE_DEBUG_FEATURES", "false") buildConfigField("String", "GIT_COMMIT", "\"\"") } named("debug") { @@ -63,12 +63,4 @@ class ApplicationPlugin : Plugin<Project> { project.configureBuildSigning() } } - - private fun Project.isSnapshot(): Boolean { - with(providers) { - val workflow = environmentVariable("GITHUB_WORKFLOW") - val snapshot = environmentVariable("SNAPSHOT") - return workflow.isPresent || snapshot.isPresent - } - } } |
