From 5236437586783f3d4c5f471ebd8f4f897027a572 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 22 Jun 2026 12:30:24 +0000 Subject: [PATCH] Set benchmark build app name to "Amber Benchmark" The benchmark flavor is built as a release APK, where the release build type's resValue sets app_name to "Amber". Since build-type resValues take precedence over product-flavor resValues, override app_name via the variant API (highest-priority tier) so the side-by-side benchmark install has a distinct launcher name. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_018WzuueL183J65rqDgrb9fL --- app/build.gradle.kts | 14 ++++++++++++++ app/src/main/res/values/strings.xml | 1 + 2 files changed, 15 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b20c16a0..8d0bf0e4 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -175,6 +175,20 @@ android { } } +// The benchmark flavor is built as a release APK, where the release build type's +// resValue sets app_name to "Amber". Build-type resValues take precedence over +// product-flavor resValues, so override app_name here via the variant API (the +// highest-priority tier) to give the side-by-side benchmark install its own +// launcher name. +androidComponents { + onVariants(selector().withFlavor("version" to "benchmark")) { variant -> + variant.resValues.put( + variant.makeResValueKey("string", "app_name"), + com.android.build.api.variant.ResValue("@string/app_name_benchmark"), + ) + } +} + composeCompiler { reportsDestination.set(layout.buildDirectory.dir("compose_compiler")) } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8a5b4bd1..d4fea627 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,6 +1,7 @@ Amber Amber Debug + Amber Benchmark Account & keys Network