Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[One .NET] fix for %(AndroidSkipResourceProcessing) (#6361)
Building a `dotnet new maui` app, I noticed a lot of time spent in `<ConvertResourcesCases/>`: 1346 ms ConvertResourcesCases Reviewing the build logs, I found `%(AndroidSkipResourceProcessing)` was set to `false` for all AndroidX `.aar` files. This should not be the case, because we don't need to fix up casing in these libraries. After review, I found a bug in the `_ResolveAars` MSBuild target: <AndroidAarLibrary Include="@(_AarFromLibraries)" Exclude="@(AndroidAarLibrary)" Pack="false" /> <AndroidAarLibrary Update="@(_AarFromLibraries)" AndroidSkipResourceProcessing="false" /> The second update was setting `%(AndroidSkipResourceProcessing)` on libraries it shouldn't have. I collapsed these two item groups into a single `Include` and this fixes the issue. I could reproduce the problem by updating a test we had -- it wasn't properly listing AndroidX libraries used in .NET 6 in the test. Results of an initial build of `dotnet new maui` were improved by: Before: 1346 ms ConvertResourcesCases After: 52 ms ConvertResourcesCases So this should improve the initial build by 1.3s, or incremental builds that update `.aar` files.
- Loading branch information