[One .NET] improve default MSBuild item groups#5349
Merged
jonpryor merged 1 commit intodotnet:masterfrom Dec 3, 2020
Merged
Conversation
jonathanpeppers
commented
Dec 1, 2020
When implementing dotnet#5348, I noticed that we could add a wildcard to make Java bindings simpler: <TransformFile Include="Transforms\**\*.xml" /> This way you can just put `.xml` files in the `Transforms` folder so they will be picked up automatically. We also need to include some additional wildcards: <AndroidLibrary Include="**\*.jar" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" /> <AndroidLibrary Include="**\*.aar" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" /> <AndroidNativeLibrary Include="**\*.so" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" /> To make sure we exclude folders like `bin` and `obj`, we can rely on `$(DefaultItemExcludes)` and `$(DefaultExcludesInProjectFolder)` as the dotnet/sdk does: https://github.com/dotnet/sdk/blob/3e9e1d1e3082cab14593b54562c956b155881658/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.props#L37 I updated a test that uses a `Metadata.xml`, and it now relies on the new defaults.
fe0afef to
23fee30
Compare
dellis1972
approved these changes
Dec 3, 2020
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
When implementing #5348, I noticed that we could add a wildcard to
make Java bindings simpler:
This way you can just put
.xmlfiles in theTransformsfolder sothey will be picked up automatically.
We also need to include some additional wildcards:
To make sure we exclude folders like
binandobj, we can rely on$(DefaultItemExcludes)and$(DefaultExcludesInProjectFolder)asthe dotnet/sdk does:
https://github.com/dotnet/sdk/blob/3e9e1d1e3082cab14593b54562c956b155881658/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.props#L37
I updated a test that uses a
Metadata.xml, and it now relies on thenew defaults.