diff --git a/includes/size-analysis/build-configuration-android.mdx b/includes/size-analysis/build-configuration-android.mdx index 219abae1f2adb..f99aafc7a8613 100644 --- a/includes/size-analysis/build-configuration-android.mdx +++ b/includes/size-analysis/build-configuration-android.mdx @@ -1,3 +1,14 @@ -Build configuration metadata keeps comparisons scoped to like-for-like builds. For example, on a PR status check, the comparison will only be made for builds with the same build configuration. +Build configuration metadata keeps comparisons scoped to like-for-like builds. For example, on a PR status check, the comparison will only be made for builds with the same build configuration. This is important because `release` and `debug` builds can be drastically different in size due to compiler optimizations, minification (R8/ProGuard), and resource shrinking. Comparing a `debug` build against a `release` build would give misleading results. + +The Android Gradle plugin automatically sends the **build variant** as the build configuration. A build variant is the combination of a build type and product flavor: + +| Component | Examples | Description | +| --------- | -------- | ----------- | +| Build type | `debug`, `release` | Defines build settings like minification and debuggability | +| Product flavor | `free`, `paid`, `demo` | Defines different versions of your app (optional) | +| Build variant | `debug`, `release`, `freeDebug`, `paidRelease` | The combination of build type + flavor | + +For apps without product flavors, the build variant is just the build type (for example, `release`). For apps with flavors, it's the combination (for example, `freeRelease` or `paidDebug`). + +If your app flavors are comparable you may want to change the `build_configuration` to be set to the build type alone. -The Android Gradle plugin sends the build variant (for example, `freeDebug` or `paidRelease`).