From 671d7e68c9f856f081d5ac7e6a66b85b95071e2b Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 14 Oct 2025 15:00:48 -0400 Subject: [PATCH 1/2] chore: add Kotlin DSL instructions to Android flavors guide --- .../docs/code-push/guides/flavors/android.mdx | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/content/docs/code-push/guides/flavors/android.mdx b/src/content/docs/code-push/guides/flavors/android.mdx index ef73caa0..cb13e8b9 100644 --- a/src/content/docs/code-push/guides/flavors/android.mdx +++ b/src/content/docs/code-push/guides/flavors/android.mdx @@ -6,6 +6,8 @@ sidebar: order: 21 --- +import { Tabs, TabItem } from '@astrojs/starlight/components'; + This guide will walk through how to setup an app in which there are 2 deployment flavors: `internal` and `stable`. It will cover how to validate a patch on the internal flavor and then promote the patch to the stable flavor on Android. @@ -30,7 +32,39 @@ Create a new project using `flutter create flavors`. ## Configure Flavors -Next, edit the `android/app/build.gradle` to contain two productFlavors: + + + + +Next edit the `android/app/build.gradle.kts` to contain two productFlavors: + +```diff +defaultConfig { + ... +} + ++ flavorDimensions += "track" ++ productFlavors { ++ create("internal") { ++ dimension = "track" ++ applicationIdSuffix = ".internal" ++ manifestPlaceholders["applicationLabel"] = "[Internal] Shorebird Example" ++ } ++ create("stable") { ++ dimension = "track" ++ manifestPlaceholders["applicationLabel"] = "Shorebird Example" ++ } ++ } + +buildTypes { + ... +} +``` + + + + +Next edit the `android/app/build.gradle` to contain two productFlavors: ```diff defaultConfig { @@ -54,6 +88,8 @@ buildTypes { ... } ``` + + Lastly, edit `android/app/src/main/AndroidManifest.xml` to use the `applicationLabel` so that we can differentiate the two apps easily: From 4f12870f6fc18d7545182d7f52521183b0f22531 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 14 Oct 2025 15:02:20 -0400 Subject: [PATCH 2/2] format --- src/content/docs/code-push/guides/flavors/android.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content/docs/code-push/guides/flavors/android.mdx b/src/content/docs/code-push/guides/flavors/android.mdx index cb13e8b9..96eb492b 100644 --- a/src/content/docs/code-push/guides/flavors/android.mdx +++ b/src/content/docs/code-push/guides/flavors/android.mdx @@ -60,6 +60,7 @@ buildTypes { ... } ``` + @@ -88,6 +89,7 @@ buildTypes { ... } ``` +