-
Notifications
You must be signed in to change notification settings - Fork 47
supported flavors
Flavor dimensions are used to define different categories of flavors. Each product flavor belongs to one of these dimensions.
- brand
- testing
- license
Each dimension can have multiple flavors, and combinations of these flavors across dimensions can be built to create different variants of the application.
This dimension categorizes flavors based on branding.
-
ooni
- Dimension: brand
- Description: This is the default branding flavor for the OONI Probe application.
-
dw
- Dimension: brand
- Description: This flavor customizes the app for a specific partner, Deutsche Welle (DW ~ News Media Scan).
This dimension categorizes flavors based on the testing stage of the application.
-
stable
- Dimension: testing
- Description: Represents the stable release version of the application.
-
Properties:
- 'String', 'BASE_SOFTWARE_NAME', '"ooniprobe-android"': Sets a build configuration field for the base software name.
- 'String', 'OONI_API_BASE_URL', '"https://api.prod.ooni.io"': Sets a build configuration field for the production API base URL.
-
dev
- Dimension: testing
- Description: Represents the development version with specific configurations for development and testing.
-
Properties:
-
applicationIdSuffix
: '.dev': Appends a suffix to the application ID for the development version. -
versionNameSuffix
: resolveVersionSuffix('beta'): Appends a suffix to the version name, resolved using a custom function. -
versionCode
: resolveVersionCode(): Sets the version code using a custom function. - 'BASE_SOFTWARE_NAME', '"ooniprobe-android-dev"': Sets a build configuration field for the base software name.
- 'OONI_API_BASE_URL', '"https://api.dev.ooni.io"': Sets a build configuration field for the development API base URL.
-
-
experimental
- Dimension: testing
- Description: Represents the experimental version for testing new features.
-
Properties:
-
applicationIdSuffix
: '.experimental': Appends a suffix to the application ID for the experimental version. -
versionNameSuffix
: resolveVersionSuffix('experimental'): Appends a suffix to the version name, resolved using a custom function. -
versionCode
: resolveVersionCode(): Sets the version code using a custom function. - 'BASE_SOFTWARE_NAME', '"ooniprobe-android-experimental"': Sets a build configuration field for the base software name.
- 'OONI_API_BASE_URL', '"https://api.dev.ooni.io"': Sets a build configuration field for the development API base URL.
-
This dimension categorizes flavors based on licensing and distribution requirements.
-
fdroid
- Dimension: license
- Description: Main differences from the full version may include the absence of Google Services, Logging and crash reporting.
-
full
- Dimension: license
- Description: Full-featured version, possibly including all features.
The build.gradle
file uses flavor dimensions to organize various product flavors, allowing for the creation of multiple app variants with different configurations. This setup enables targeting different branding, testing stages, and licensing requirements efficiently.
-
Brand Dimension: Differentiates flavors based on the organization or partner (e.g.,
ooni
,dw
). -
Testing Dimension: Differentiates flavors based on the development and testing stages (e.g.,
stable
,dev
,experimental
). -
License Dimension: Differentiates flavors based on licensing and distribution channels (e.g.,
fdroid
,full
).
Each flavor can define its own unique properties, such as applicationId
, versionNameSuffix
, versionCode
, buildConfigField
, and resValue
, to customize the build and behavior of the app for different use cases.
The different combinations of flavors across dimensions create various app variants. For example, the ooniStableFullDebug
variant represents the stable release version of the OONI Probe app with full features enabled for debugging.
The variant names are therefore:
ooniExperimentalFullDebug
ooniExperimentalFullRelease
ooniDevFullDebug
ooniDevFullRelease
ooniStableFullDebug
ooniStableFullRelease
dwExperimentalFullDebug
dwExperimentalFullRelease
dwDevFullDebug
dwDevFullRelease
dwStableFullDebug
dwStableFullRelease
We additionally have ooniStableFdroidDebug
, ooniStableFdroidRelease
, dwStableFdroidDebug
and dwStableFdroidRelease
.