Skip to content

Filter split-transitioned deps to a single split in collect_maven_apk_info. - #2542

Merged
copybara-service[bot] merged 1 commit into
mainfrom
piper_1029128999
Nov 25, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
piper_1029128999

Conversation

@copybara-service

Copy link
Copy Markdown

Filter split-transitioned deps to a single split in collect_maven_apk_info.

When android_binary builds with multiple splits (for example via --android_platforms with multiple platforms), ctx.rule.attr.deps exposes every split configuration of each dependency. Collecting transitive_included_src_jars across all splits passes duplicate -src.jar files from different output roots to jarcombiner, failing with duplicate entry errors.

Track each target's platform in collect_maven_apk_info via ctx.fragments.platform.platform and filter deps to the primary platform split, falling back to deduplicating by label when splits share a platform.

@copybara-service
copybara-service Bot force-pushed the piper_1029128999 branch 2 times, most recently from bf15db4 to 3a02206 Compare November 25, 2026 18:44
…_info.

When `android_binary` builds with multiple splits (for example via `--android_platforms` with multiple platforms), `ctx.rule.attr.deps` exposes every split configuration of each dependency. Collecting `transitive_included_src_jars` across all splits passes duplicate `-src.jar` files from different output roots to `jarcombiner`, failing with duplicate entry errors.

Track each target's platform in `collect_maven_apk_info` via `ctx.fragments.platform.platform` and filter `deps` to the primary platform split, falling back to deduplicating by label when splits share a platform.

PiperOrigin-RevId: 1030050132
@copybara-service
copybara-service Bot merged commit 6246827 into main Nov 25, 2026
6 checks passed
@copybara-service
copybara-service Bot deleted the piper_1029128999 branch November 25, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant