Commit 12b28f2
[One .NET] enable C# bindings for @(AndroidLibrary) (#6056)
Fixes: dotnet/maui#1475
A .NET 6 application project was failing to include C# bindings for
`.aar` files, but `.jar` files were working.
The workaround was to include:
<LibraryProjectZip Include="myjavalibrary.aar" />
We had a test that checked this behavior for `.jar` files, but not
`.aar` files.
After reproducing the behavior in a test, I found the
`_CategorizeAndroidLibraries` MSBuild target did not automatically
setup the `@(LibraryProjectZip)` item group in .NET 6 application
projects. `@(AndroidAarLibrary)` *was* being setup, which explained
why the Java code made it to `classes.dex`, but C# bindings were
missing.
Updated the `_CategorizeAndroidLibraries` MSBuild target for this case.1 parent 855e0ba commit 12b28f2
File tree
2 files changed
+16
-3
lines changed- src/Xamarin.Android.Build.Tasks
- MSBuild/Xamarin/Android
- Tests/Xamarin.Android.Build.Tests
2 files changed
+16
-3
lines changedLines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
89 | | - | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
379 | 388 | | |
380 | 389 | | |
381 | 390 | | |
| |||
420 | 429 | | |
421 | 430 | | |
422 | 431 | | |
423 | | - | |
424 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
425 | 435 | | |
426 | 436 | | |
427 | 437 | | |
| |||
0 commit comments