Commit 14a9470
authored
[Java.Interop.Tools.TypeNameMappings] introduce project for net8.0 (#1199)
Context: dotnet/android#8751
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9137456&view=logs&j=96fd57f5-f69e-53c7-3d47-f67e6cf9b93e&s=1afc3bfe-122c-538b-e9ad-2a86c2efcfef&t=38f83f46-bc21-5edd-1614-e44f20babf10&l=29658
Context: 67c079c
Context: 56b7eeb
dotnet/android#8751 has a random build failure:
"Xamarin.Android.sln" (default target) (1:2) ->
"src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj" (default target) (28:9) ->
(CoreCompile target) ->
src/Xamarin.Android.Build.Tasks/Utilities/MamJsonParser.cs(92,43): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]
src/Xamarin.Android.Build.Tasks/Utilities/MamJsonParser.cs(92,81): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]
src/Xamarin.Android.Build.Tasks/Utilities/MavenExtensions.cs(26,32): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]
It happens some percentage of the time…
Similar to 67c079c, the cause is that commit 56b7eeb updated
`Java.Interop.Tools.JavaCallableWrappers.csproj` to multitarget both
netstandard2.0 and net8.0, and on some builds the
`Java.Interop.Tools.JavaCallableWrappers.dll` used by
`Xamarin.Android.Build.Tasks.csproj` is the net8.0 build, *not* the
netstandard2.0 build.
To fix this:
* Don't build `Java.Interop.Tools.JavaCallableWrappers.csproj` for
`net8.0` anymore; remove net8.0 from `$(TargetFrameworks)`.
* Introduce a new `Java.Interop.Tools.TypeNameMappings.csproj`
project which builds the source code within
`Java.Interop.Tools.JavaCallableWrappers.csproj` for net8.0.
The resulting assembly is not shipped or used. It can check
trimmer warnings, though.
This partially reverts 67c079c and 56b7eeb.1 parent bd793f1 commit 14a9470
File tree
3 files changed
+41
-10
lines changed- src
- Java.Interop.Tools.JavaCallableWrappers
- Java.Interop.Tools.TypeNameMappings
3 files changed
+41
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
| |||
326 | 330 | | |
327 | 331 | | |
328 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
329 | 337 | | |
330 | 338 | | |
331 | 339 | | |
| |||
381 | 389 | | |
382 | 390 | | |
383 | 391 | | |
| 392 | + | |
384 | 393 | | |
385 | 394 | | |
386 | 395 | | |
| |||
Lines changed: 3 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 20 | | |
28 | 21 | | |
29 | 22 | | |
30 | 23 | | |
31 | 24 | | |
32 | 25 | | |
33 | | - | |
| 26 | + | |
34 | 27 | | |
35 | 28 | | |
36 | 29 | | |
| |||
Lines changed: 29 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 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments