-
Notifications
You must be signed in to change notification settings - Fork 564
Mark API-31 as stable. #6174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark API-31 as stable. #6174
Conversation
de2ef3d to
4479e3b
Compare
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs
Outdated
Show resolved
Hide resolved
jonathanpeppers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go ahead and bump this to 31.0.100:
Do we know if it will be Android 12? If we don't know yet, we can leave this one alone:
|
It doesn't look like 823fec5 fixed the issue with binding projects. It's tough because these tests pass for me locally somehow... |
…in binding projects
After API 31 is stable, binding projects with
`TargetFrameworkVersion=11.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`. So 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:
<ResolveNuGetPackageAssetsDependsOn>
_SetLatestTargetFrameworkVersion;
$(ResolveNuGetPackageAssetsDependsOn)
</ResolveNuGetPackageAssetsDependsOn>
And so the `_SetLatestTargetFrameworkVersion` was not running at the
appropriate time for binding projects.
…ormSdk) in binding projects" This reverts commit 823fec5.
…in binding projects
After API 31 is stable, binding projects with
`TargetFrameworkVersion=11.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`. So 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.
The current plan will be to cherry-pick all the API-31 -related changes to the d16-11 branch. d16-11 will becomes Xamarin.Android 12.0, and main will become 12.0.99. |
[Mono.Android] API-31 stabilization (#6174)
Context: https://developer.android.com/about/versions/12
API-31 has been enumified (88438081, cf2a39b2, cf2a39b2).
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 8140991e.
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
(e5a4beef), remove `[DataContractAttribute]` (101fea2c), and fix the
value of `Android.OS.BuildVersionCodes.R` (1b1ec097).
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> |
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>
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>
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>
Set API-S as API-31, v12.0, and stable. Bump .NET 6 pack version to
31.0.100.Notes:
.jarused for API-31 documentation is not available yet, filed an issue to track: Bump android.jar documentation source to API-31 #6215.