Skip to content

Prevent duplicate ML Kit barcode-scanning AAR packaging - #1520

Open
jonathanpeppers with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-barcode-scanning-duplicate-warnings
Open

Prevent duplicate ML Kit barcode-scanning AAR packaging#1520
jonathanpeppers with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-barcode-scanning-duplicate-warnings

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Xamarin.Google.MLKit.BarcodeScanning embedded its AAR while also downloading it twice through build-transitive targets, producing duplicate XA4301 warnings.

  • Packaging

    • Mark local XBD AAR inputs as non-packable, retaining only the downloaded artifact.
    • Remove the duplicate XamarinBuildDownloadAndroidAarLibrary item.
    <AndroidLibrary Include="...\barcode-scanning.aar" Pack="false" />
  • Versioning

    • Bump Xamarin.Google.MLKit.BarcodeScanning from 117.3.0.8 to 117.3.0.9.

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
Copilot AI requested a review from jonathanpeppers August 14, 2026 16:43
@jonathanpeppers
jonathanpeppers marked this pull request as ready for review August 14, 2026 19:05
Copilot AI lite review requested due to automatic review settings August 14, 2026 19:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AndroidLibrary item as Pack="false" in the XBD project template.
  • Remove a duplicate XamarinBuildDownloadAndroidAarLibrary item emission in the XBD targets template so the downloaded AAR is only included once.
  • Bump Xamarin.Google.MLKit.BarcodeScanning NuGet version from 117.3.0.8 to 117.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.

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.

Xamarin.Google.MLKit.BarcodeScanning packages barcode-scanning 17.3.0 twice (embedded AAR + XamarinBuildDownload), causing duplicate XA4301 warnings

3 participants