refactor: rename dashboards→webviews, unique applicationId per flavor
build / build (push) Failing after 3m11s

Each flavor gets applicationIdSuffix = ".<name>" so the Bravia
getApplicationList API returns a distinct URI per webview, enabling
Control4 to launch specific flavors independently.

BREAKING CHANGE: applicationId changed from cz.c3c.webviewkiosk to
cz.c3c.webviewkiosk.<flavor> — uninstall old app before reinstalling.
BuildConfig.DASHBOARD_URL renamed to WEBVIEW_URL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Arnie via Claude
2026-06-12 18:22:51 +02:00
parent 4982af9df4
commit a36d3869b1
5 changed files with 32 additions and 27 deletions
+7 -6
View File
@@ -6,8 +6,8 @@ plugins {
}
@Suppress("UNCHECKED_CAST")
val dashboards: Map<String, Map<String, String>> =
Yaml().load(rootProject.file("dashboards.yaml").inputStream())
val webviews: Map<String, Map<String, String>> =
Yaml().load(rootProject.file("webviews.yaml").inputStream())
android {
namespace = "cz.c3c.webviewkiosk"
@@ -41,13 +41,14 @@ android {
}
}
flavorDimensions += "dashboard"
flavorDimensions += "webview"
productFlavors {
dashboards.forEach { (name, config) ->
webviews.forEach { (name, config) ->
create(name) {
dimension = "dashboard"
buildConfigField("String", "DASHBOARD_URL", "\"${config["url"]}\"")
dimension = "webview"
applicationIdSuffix = ".$name"
buildConfigField("String", "WEBVIEW_URL", "\"${config["url"]}\"")
resValue("string", "app_name", config["label"] ?: name)
}
}