From a92aa1a00746e4963bffa05cc4abe450e919bb38 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 6 Nov 2026 10:13:12 +0100 Subject: 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 --- CHANGELOG.md | 6 ++++++ .../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 { "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.configureBuildSigning() } } - - private fun Project.isSnapshot(): Boolean { - with(providers) { - val workflow = environmentVariable("GITHUB_WORKFLOW") - val snapshot = environmentVariable("SNAPSHOT") - return workflow.isPresent || snapshot.isPresent - } - } } -- cgit v1.2.3