File tree Expand file tree Collapse file tree
src/content/docs/code-push/guides/flavors Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 order : 21
77---
88
9+ import { Tabs , TabItem } from ' @astrojs/starlight/components' ;
10+
911This guide will walk through how to setup an app in which there are 2 deployment
1012flavors: ` internal ` and ` stable ` . It will cover how to validate a patch on the
1113internal flavor and then promote the patch to the stable flavor on Android.
@@ -30,7 +32,40 @@ Create a new project using `flutter create flavors`.
3032
3133## Configure Flavors
3234
33- Next, edit the ` android/app/build.gradle ` to contain two productFlavors:
35+ <Tabs >
36+
37+ <TabItem value = " kotlin" label = " Kotlin DSL" >
38+
39+ Next edit the ` android/app/build.gradle.kts ` to contain two productFlavors:
40+
41+ ``` diff
42+ defaultConfig {
43+ ...
44+ }
45+
46+ + flavorDimensions += "track"
47+ + productFlavors {
48+ + create("internal") {
49+ + dimension = "track"
50+ + applicationIdSuffix = ".internal"
51+ + manifestPlaceholders["applicationLabel"] = "[Internal] Shorebird Example"
52+ + }
53+ + create("stable") {
54+ + dimension = "track"
55+ + manifestPlaceholders["applicationLabel"] = "Shorebird Example"
56+ + }
57+ + }
58+
59+ buildTypes {
60+ ...
61+ }
62+ ```
63+
64+ </TabItem >
65+
66+ <TabItem value = " groovy" label = " Groovy DSL" >
67+
68+ Next edit the ` android/app/build.gradle ` to contain two productFlavors:
3469
3570``` diff
3671defaultConfig {
@@ -55,6 +90,9 @@ buildTypes {
5590}
5691```
5792
93+ </TabItem >
94+ </Tabs >
95+
5896Lastly, edit ` android/app/src/main/AndroidManifest.xml ` to use the
5997` applicationLabel ` so that we can differentiate the two apps easily:
6098
You can’t perform that action at this time.
0 commit comments