aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-android/app/build.gradle.kts
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-10 14:40:05 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-10 14:40:05 +0200
commitaed32f20625a6206628b577d743d96552f81e91a (patch)
treeaf2eaf3336804f2e4af37445326e52a19b2af169 /packages/meshbay-android/app/build.gradle.kts
parent2f2a9a6542d2194e50ffba6f382e4fdffd481838 (diff)
downloadmeshbay-aed32f20625a6206628b577d743d96552f81e91a.tar.gz
feat(android): back text messages up, in a build Play does not get
A Messages section sends the SMS added since the last copy, as restorable <smses> XML, into <folder>/<account>-messages/YYYY. A play flavor has neither READ_SMS nor the code that reads messages; full is the default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-android/app/build.gradle.kts')
-rw-r--r--packages/meshbay-android/app/build.gradle.kts13
1 files changed, 12 insertions, 1 deletions
diff --git a/packages/meshbay-android/app/build.gradle.kts b/packages/meshbay-android/app/build.gradle.kts
index 7f7ba3c..cd5e1a5 100644
--- a/packages/meshbay-android/app/build.gradle.kts
+++ b/packages/meshbay-android/app/build.gradle.kts
@@ -32,6 +32,16 @@ android {
keyPassword = providers.gradleProperty("meshbayReleaseKeyPassword").get()
}
}
+ // Two builds of the same application, the same id and key. `full` is the
+ // one distributed directly; `play` is for the Play Store, whose policy
+ // gives READ_SMS to the default SMS application only, so it has no
+ // messages backup: not the permission, and not the code that reads them
+ // (src/full, src/play: Flavor.kt).
+ flavorDimensions += "store"
+ productFlavors {
+ create("full") { dimension = "store"; isDefault = true }
+ create("play") { dimension = "store" }
+ }
buildTypes {
getByName("release") {
isMinifyEnabled = false
@@ -100,7 +110,8 @@ val syncUi = tasks.register<SyncUi>("syncUi") {
// Checked when a release is built, not when the project is configured, so a
// debug build and the unit tests need no key.
tasks.configureEach {
- if (name == "preReleaseBuild") doFirst {
+ // One per build: preFullReleaseBuild, prePlayReleaseBuild.
+ if (name.startsWith("pre") && name.endsWith("ReleaseBuild")) doFirst {
val missing = releaseSigning.filter { !providers.gradleProperty(it).isPresent }
if (missing.isNotEmpty()) throw GradleException(
"no release key: set ${missing.joinToString()} in ~/.gradle/gradle.properties")