Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit eac58c0

Browse files
author
danil
committedMay 1, 2024·
Add android documentation for use Flaker with multiple build variants
change build type, remove example with product flavor
1 parent 831ddc2 commit eac58c0

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
 

‎docs/android-build-variants.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Usage
2+
3+
## Setting Up Flaker with Multiple Variants on Android
4+
5+
When integrating Flaker into an Android project that includes more than just the standard debug and release variants, it's essential to configure Flaker to handle these additional variants properly.
6+
One crucial aspect of this configuration is using matchingFallbacks in your project's build.gradle file. Here's why and how you should do it:
7+
8+
### Why Use matchingFallbacks?
9+
10+
Android projects often include custom build types or flavors, which may not directly match those of the dependencies they rely on. When Flaker attempts to match variants between your app and its dependencies, it may encounter situations where a direct match is not possible due to differences in build types or flavors. In such cases, matchingFallbacks provides a mechanism to specify alternative matches, ensuring proper variant resolution.
11+
12+
### Adding matchingFallbacks to Your Project
13+
14+
To ensure Flaker handles multiple variants correctly in your project, you should add matchingFallbacks to your project's build.gradle file, specifying fallback build types or flavors that Flaker should try when direct matches are unavailable. Here's how you can do it:
15+
16+
#### 1) Build Type
17+
```kotlin
18+
android {
19+
buildTypes {
20+
release {
21+
}
22+
qa {
23+
matchingFallbacks = ['debug', 'release']
24+
}
25+
}
26+
}
27+
```

0 commit comments

Comments
 (0)