From cd5c1a958779e45514c826775c0112d095b9a237 Mon Sep 17 00:00:00 2001 From: Brummel Date: Wed, 20 May 2026 18:56:46 +0200 Subject: [PATCH] feat(wear): expose PROFILE_NAME and IS_DEV_PROFILE to the app BuildConfig now carries the active profile name plus an isDev boolean (profile name ends in '-dev'). The manifestPlaceholder 'appLabel' switches between 'Doctate' and 'Doctate (Dev)' for the launcher. refs #3 --- clients/wearos/app/build.gradle.kts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/clients/wearos/app/build.gradle.kts b/clients/wearos/app/build.gradle.kts index 6ad7eac..b3aac38 100644 --- a/clients/wearos/app/build.gradle.kts +++ b/clients/wearos/app/build.gradle.kts @@ -28,6 +28,8 @@ android { // profile concept. fun resolveProp(key: String, default: String): String = (project.findProperty(key) as? String) ?: default + val profileName = resolveProp("doctate.profileName", "unknown") + val isDevProfile = profileName.endsWith("-dev") buildConfigField( "String", "SERVER_URL", "\"${resolveProp("doctate.serverUrl", "http://10.0.2.2:3000")}\"" @@ -36,6 +38,15 @@ android { "String", "API_KEY", "\"${resolveProp("doctate.apiKey", "MISSING_API_KEY")}\"" ) + buildConfigField( + "String", "PROFILE_NAME", + "\"$profileName\"" + ) + buildConfigField( + "boolean", "IS_DEV_PROFILE", + "$isDevProfile" + ) + manifestPlaceholders["appLabel"] = if (isDevProfile) "Doctate (Dev)" else "Doctate" } buildTypes {