diff options
Diffstat (limited to 'packages/meshbay-android/app/build.gradle.kts')
| -rw-r--r-- | packages/meshbay-android/app/build.gradle.kts | 13 |
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") |