Commit 52d6880
authored
[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 d593b72 commit 52d6880
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 | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
383 | 392 | | |
384 | 393 | | |
385 | 394 | | |
| |||
425 | 434 | | |
426 | 435 | | |
427 | 436 | | |
428 | | - | |
429 | | - | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
430 | 440 | | |
431 | 441 | | |
432 | 442 | | |
| |||
0 commit comments