You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: https://developer.android.com/about/versions/12
API-31 has been enumified (8843808, cf2a39b, cf2a39b).
Time to declare it stable!
Set API-S as API-31, `$(TargetFrameworkVersion)`=v12.0,
`$(AndroidPackVersion)`=31.0.100, and declare as stable.
Update unit test files so `$(TargetFrameworkVersion)`= v12.0 (API-31)
*or* `$(TargetFrameworkVersion)` isn't needed, a'la 8140991.
Rename `src/Mono.Android/Profiles/api-S.params.txt` to
`api-31.params.txt`, to match the stable API-level ID.
Updated `tests/api-compatibility/acceptable-breakages-vReference.txt`
because the default API compare will now be against `API-31`, not
`API-30`, and we deliberately removed the `[Category]` custom attribute
(e5a4bee), remove `[DataContractAttribute]` (101fea2), and fix the
value of `Android.OS.BuildVersionCodes.R` (1b1ec09).
Support `$(AndroidUseLatestPlatformSdk)` in binding projects: once
API-31 is stable, binding projects with
`$(TargetFrameworkVersion)`=v11.0 and
`$(AndroidUseLatestPlatformSdk)`=true fail to build with:
Task ResolveNuGetPackageAssets
...
Microsoft.NuGet.targets(198,5): Your project does not reference "MonoAndroid,Version=v12.0" framework. Add a reference to "MonoAndroid,Version=v12.0" in the "TargetFrameworks" property of your project file and then re-run NuGet restore.
What happened is that `$(TargetFrameworkVersion)` was changed to 12.0
during `Build`, but not during `Restore`. Thus NuGet restored with
`MonoAndroid,Version=v11.0` instead of `MonoAndroid,Version=v12.0`.
I found that we have this setup for other project types, but not
binding projects:
<!--
NOTE:
This target runs during Restore, and there is no $(RestoreDependsOn) property.
There appears to be no other way to do this other than use BeforeTargets.
-->
<Target Name="_SetLatestTargetFrameworkVersionForPackageReference"
Condition=" '$(AndroidUseLatestPlatformSdk)' == 'True' "
BeforeTargets="_GetRestoreTargetFrameworksOutput"
DependsOnTargets="_SetLatestTargetFrameworkVersion">
</Target>
If we move this target to `Xamarin.Android.Legacy.targets`, it will be
imported by binding projects.
We also get the added benefit of it not being in .NET 6.
`$(AndroidUseLatestPlatformSdk)` is not supported in .NET 6, so we
should not have this MSBuild target there.
Co-authored-by: Jonathan Peppers <[email protected]>
Copy file name to clipboardExpand all lines: build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/CheckApiCompatibility.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ public sealed class CheckApiCompatibility : Task
0 commit comments