Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Context: xamarin/GooglePlayServicesComponents#652

In .NET 6, @(AndroidLibrary) defaults to %(Pack) being true, while
@(LibraryProjectZip) mistakenly does not. This would be an issue if
you migrated a project using @(LibraryProjectZip) and were not
relying on the default wildcards that would use:

<AndroidLibrary Include="**/*.aar" />

Let's set this value by default, to ease migration to .NET 6.

I updated a test for this scenario and fixed some assertions that are
working since 2ca2a10 was merged.

Context: xamarin/GooglePlayServicesComponents#652

In .NET 6, `@(AndroidLibrary)` defaults to `%(Pack)` being true, while
`@(LibraryProjectZip)` mistakenly does not. This would be an issue if
you migrated a project using `@(LibraryProjectZip)` and were not
relying on the default wildcards that would use:

    <AndroidLibrary Include="**/*.aar" />

Let's set this value by default, to ease migration to .NET 6.

I updated a test for this scenario and fixed some assertions that are
working since 2ca2a10 was merged.
@jonpryor
Copy link
Contributor

jonpryor commented Jul 6, 2022

Context: https://github.com/xamarin/GooglePlayServicesComponents/issues/652

In .NET 6, `@(AndroidLibrary.Pack)` defaults to true (97190b6c), while
`%(LibraryProjectZip.Pack)` was never set, and thus was false.  This
would be an issue if you migrated a project using `@(LibraryProjectZip)` and were
not relying on the default wildcards used by:

	<AndroidLibrary Include="**/*.aar" />

The result is that `.aar` files weren't included into the `.nupkg`,
which would result in subsequent build & packaging errors when
using the `.nupkg`, as the `.aar` was missing.

Set `%(LibraryProjectZip.Pack)`=True by default in .NET 6+, to ease
project migration from Classic Xamarin.Android to .NET 6.

I updated a test for this scenario and fixed some assertions that are
working since 2ca2a103 was merged.

@jonpryor jonpryor merged commit f149c25 into dotnet:main Jul 6, 2022
@jonathanpeppers jonathanpeppers deleted the PackLibraryProjectZip branch July 6, 2022 19:19
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Jul 26, 2022
…tnet#7151)

Context: xamarin/GooglePlayServicesComponents#652

In .NET 6, `@(AndroidLibrary.Pack)` defaults to true (97190b6), while
`%(LibraryProjectZip.Pack)` was never set, and thus was false.  This
would be an issue if you migrated a project using `@(LibraryProjectZip)` and were
not relying on the default wildcards used by:

	<AndroidLibrary Include="**/*.aar" />

The result is that `.aar` files weren't included into the `.nupkg`,
which would result in subsequent build & packaging errors when
using the `.nupkg`, as the `.aar` was missing.

Set `%(LibraryProjectZip.Pack)`=True by default in .NET 6+, to ease
project migration from Classic Xamarin.Android to .NET 6.

I updated a test for this scenario and fixed some assertions that are
working since 2ca2a10 was merged.
jonathanpeppers added a commit that referenced this pull request Aug 1, 2022
)

Backport: #7151
Context: xamarin/GooglePlayServicesComponents#652

In .NET 6, `@(AndroidLibrary.Pack)` defaults to true (97190b6), while
`%(LibraryProjectZip.Pack)` was never set, and thus was false.  This
would be an issue if you migrated a project using `@(LibraryProjectZip)` and were
not relying on the default wildcards used by:

	<AndroidLibrary Include="**/*.aar" />

The result is that `.aar` files weren't included into the `.nupkg`,
which would result in subsequent build & packaging errors when
using the `.nupkg`, as the `.aar` was missing.

Set `%(LibraryProjectZip.Pack)`=True by default in .NET 6+, to ease
project migration from Classic Xamarin.Android to .NET 6.

I updated a test for this scenario and fixed some assertions that are
working since 2ca2a10 was merged.
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants