Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions includes/size-analysis/build-configuration-android.mdx
Original file line number Diff line number Diff line change
@@ -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`).