Prevent duplicate ML Kit barcode-scanning AAR packaging - #1520
Open
jonathanpeppers with Copilot wants to merge 2 commits into
Open
Prevent duplicate ML Kit barcode-scanning AAR packaging#1520jonathanpeppers with Copilot wants to merge 2 commits into
jonathanpeppers with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix duplicate XA4301 warnings in barcode scanning package
Prevent duplicate ML Kit barcode-scanning AAR packaging
Aug 14, 2026
jonathanpeppers
marked this pull request as ready for review
August 14, 2026 19:05
There was a problem hiding this comment.
Pull request overview
This pull request updates the Xamarin Build Download (XBD) packaging flow for Xamarin.Google.MLKit.BarcodeScanning to avoid embedding the same ML Kit barcode-scanning AAR that is also restored via build-transitive download targets, eliminating duplicated-native-library (XA4301) warnings for consumers.
Changes:
- Prevent packing of local XBD AAR inputs by marking the
AndroidLibraryitem asPack="false"in the XBD project template. - Remove a duplicate
XamarinBuildDownloadAndroidAarLibraryitem emission in the XBD targets template so the downloaded AAR is only included once. - Bump
Xamarin.Google.MLKit.BarcodeScanningNuGet version from117.3.0.8to117.3.0.9.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| source/XamarinBuildDownloadTargets.cshtml | Adjusts generated build-transitive targets to avoid duplicating the downloaded AAR library item. |
| source/_XBDProjectType.cshtml | Ensures local AAR inputs don’t get packed into the NuGet, avoiding embedding + download duplication. |
| config.json | Version bump for Xamarin.Google.MLKit.BarcodeScanning to ship the packaging fix. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
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.
Xamarin.Google.MLKit.BarcodeScanningembedded its AAR while also downloading it twice through build-transitive targets, producing duplicateXA4301warnings.Packaging
XamarinBuildDownloadAndroidAarLibraryitem.Versioning
Xamarin.Google.MLKit.BarcodeScanningfrom117.3.0.8to117.3.0.9.