Commit 20d6bcb
committed
[Java.Interop] JavaTypeParametersAttribute only in net6
Context: dotnet/android#6549
When attempting to bump xamarin-android to use bc5bcf4, the build
failed because bc5bcf4 added a "duplicate" type
`Java.Interop.JavaTypeParametersAttribute`:
error CS0433: The type 'JavaTypeParametersAttribute' exists in both
'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' and
'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'.
The plan was to use type forwarders for this type from
`Mono.Android.dll` to `Java.Interop.dll`, but in retrospect this
sounds like a potential "forward-incompatible ABI break" (e56a8c8)
as assemblies built against the newer `Mono.Android.dll` (with type
forwarders) won't be usable on previous Xamarin.Android SDKs.
Make `JavaTypeParametersAttribute` conditional on `NET`, so that it's
only included in .NET 6 builds. .NET SDK for Android will then use
type forwarders, which won't be an issue as there's no previous .NET
release to be forward compatible with.
Update `tests/generator-Tests` so that `JavaTypeParametersAttribute`
is once again provided for non-`NET` builds.1 parent bc5bcf4 commit 20d6bcb
File tree
3 files changed
+25
-0
lines changed- src/Java.Interop/Java.Interop
- tests/generator-Tests
- Integration-Tests
- SupportFiles
3 files changed
+25
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments