fix: Fulladle generates wrong APK paths for variants with multiple flavor dimensions#503
Open
RyuNen344 wants to merge 1 commit into
Open
fix: Fulladle generates wrong APK paths for variants with multiple flavor dimensions#503RyuNen344 wants to merge 1 commit into
RyuNen344 wants to merge 1 commit into
Conversation
RyuNen344
commented
May 22, 2026
| * | ||
| * If no variant is specified, all variants are considered a match. | ||
| */ | ||
| fun Variant.isExpectedVariantInModule(config: FulladleModuleExtension) = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fulladle manually constructs APK paths from
variant.productFlavors, but the current logic does nothandle variants with multiple flavor dimensions
correctly.
In
FulladlePlugin.kt, the flavor part is built like this:fladle/fladle-plugin/src/main/java/com/osacky/flank/gradle/FulladlePlugin.kt
Lines 33 to 34 in 0614f1f
For a variant composed from minApi24 and demo, this generates:
However, AGP generates artifacts for minApi24DemoDebug like:
build/outputs/apk/minApi24Demo/debug/app-minApi24-demo-debug.apkbuild/outputs/apk/androidTest/minApi24Demo/debug/app-minApi24-demo-debug-androidTest.apkReproduction
Configure an Android module with multiple flavor dimensions:
android { flavorDimensions "api", "mode" productFlavors { minApi24 { dimension "api" } demo { dimension "mode" } } }Then run Fulladle for minApi24DemoDebug.
Expected behavior
Fulladle should reference the actual APK paths generated by AGP:
build/outputs/apk/minApi24Demo/debug/app-minApi24-demo-debug.apkbuild/outputs/apk/androidTest/minApi24Demo/debug/app-minApi24-demo-debug-androidTest.apkActual behavior
Fulladle generates paths using the slash-joined flavor path and concatenated flavor name:
build/outputs/apk/minApi24/demo/debug/app-minApi24demo-debug.apkbuild/outputs/apk/androidTest/minApi24/demo/debug/app-minApi24demo-debug-androidTest.apkThese files do not exist, so the generated Flank config points to invalid APK paths.