forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mono.Android] API-31 stabilization (dotnet#6174)
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 <jonathan.peppers@microsoft.com>
- Loading branch information
1 parent
7a65959
commit e722825
Showing
27 changed files
with
106 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.