forked from Blendman974/faceclaw
Metadata updates for Play Store distribution
This commit is contained in:
1 parent
70ec2a0d6a
commit
8b70585da8
12 files changed
+132
-47
No files matched your search
+4
-1
@@ -102,7 +102,10 @@ Two things must match the phone app or the Data Layer silently won't route:
|
||||
building both on the same computer just works. For release builds, sign the
|
||||
watch APK with the same keystore as the phone APK.
|
||||
|
||||
There's no Play Store listing; sideload.
|
||||
Run `npm run release` from the repository root to build signed phone and Wear
|
||||
APKs for sideloading and AABs for Google Play. Both apps use the version in
|
||||
`app/version.ts`, with distinct version codes for the phone and Wear tracks;
|
||||
see [Android releases](../README.md#android-releases).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
||||
@@ -4,9 +4,21 @@ plugins {
|
||||
id("org.jetbrains.kotlin.plugin.compose")
|
||||
}
|
||||
|
||||
// Match the phone's marketing version, with a distinct Play upload code.
|
||||
val faceclawVersionName = Regex("""FACECLAW_VERSION = "([^"]+)"""")
|
||||
.find(rootProject.file("../app/version.ts").readText())?.groupValues?.get(1)
|
||||
?: error("Could not read FACECLAW_VERSION from app/version.ts")
|
||||
val faceclawVersionParts = (faceclawVersionName.substringBefore('-').split('.') + listOf("0", "0"))
|
||||
.take(3).map { it.toInt() }
|
||||
val faceclawBuildRevision = System.getenv("FACECLAW_ANDROID_BUILD_REVISION") ?: "0"
|
||||
require(faceclawBuildRevision.matches(Regex("[0-4]"))) {
|
||||
"FACECLAW_ANDROID_BUILD_REVISION must be an integer from 0 to 4"
|
||||
}
|
||||
val faceclawVersionCode = (faceclawVersionParts[0] * 10000 + faceclawVersionParts[1] * 100 + faceclawVersionParts[2]) * 10 + faceclawBuildRevision.toInt() * 2 + 1
|
||||
|
||||
android {
|
||||
namespace = "com.faceclaw.wear"
|
||||
compileSdk = 35
|
||||
compileSdk = 36
|
||||
|
||||
defaultConfig {
|
||||
// Must equal the phone app's id (nativescript.config.ts): the Wearable
|
||||
@@ -14,9 +26,9 @@ android {
|
||||
// signing key.
|
||||
applicationId = "com.faceclaw.app"
|
||||
minSdk = 30
|
||||
targetSdk = 35
|
||||
versionCode = 1
|
||||
versionName = "1.0.0"
|
||||
targetSdk = 36
|
||||
versionCode = faceclawVersionCode
|
||||
versionName = faceclawVersionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// (for release builds) the signing key, both of which the Wearable Data
|
||||
// Layer requires to match the phone app.
|
||||
plugins {
|
||||
id("com.android.application") version "8.7.3" apply false
|
||||
id("com.android.application") version "8.13.2" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.1.10" apply false
|
||||
id("org.jetbrains.kotlin.plugin.compose") version "2.1.10" apply false
|
||||
}
|
||||
Reference in new issue
Block a user