Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[One .NET] add "preview" packs for API 32 (#6491)
Fixes: #6176 Fixes: #6501 After some discussion with Daniel Plaisted, we think the best approach for setting up API 31 packs is to have multiple packs: * `Microsoft.Android.31.Ref` * `Microsoft.Android.31.Runtime.[RID]` * `Microsoft.Android.32.Ref` * `Microsoft.Android.32.Runtime.[RID]` We can check `$(TargetPlatformVersion)` to decide which pack to list in `@(KnownFrameworkReference)` during builds. These will all be versioned to match all other Android workload packs. We'll continue to use `**FromWorkload**` to define their versions in MSBuild. I created a `android-32` workload, that installs additional API 32 packs. However, this workload doesn't necessarily need to exist as targeting and runtime packs can also be resolved from NuGet.org. It is nice to install `android-32` -- from then on builds will work offline. One problem I hit was the need for `AndroidApiInfo.xml` for all supported API levels. I moved these files to the `Microsoft.Android.Sdk.[Platform]` packs, so I could include both 31 and 32 `AndroidApiInfo.xml` files. All these changes I tried to do in a way where they are based on the following new properties in `Configuration.props`: <AndroidLatestUnstableApiLevel Condition="'$(AndroidLatestUnstableApiLevel)' == ''">32</AndroidLatestUnstableApiLevel> <AndroidLatestUnstablePlatformId Condition="'$(AndroidLatestUnstablePlatformId)' == ''">Sv2</AndroidLatestUnstablePlatformId> <AndroidLatestUnstableFrameworkVersion Condition="'$(AndroidLatestUnstableFrameworkVersion)'==''">v12.0.99</AndroidLatestUnstableFrameworkVersion> <BuildDotNetPreviewApiLevel Condition=" '$(BuildDotNetPreviewApiLevel)' == '' And '$(AndroidLatestStableApiLevel)' != '$(AndroidLatestUnstableApiLevel)' ">true</BuildDotNetPreviewApiLevel> Going forward, we should be able to just update these numbers. The only decision we'll need to make is what to do about packs. In the future, if API 32 is "stable" but is not the default: 1. We don't have to keep building & shipping API 31. We can hardcode the version for stable `Microsoft.Android.31.Ref/Runtime` packages on NuGet.org. 2. Users will have to opt into `net6.0-android32`. In the future, if API 32 is "stable" and we can just make it default: 2. We get rid of `Microsoft.Android.31.Ref/Runtime` packages completely, and `net6.0-android` is `net6.0-android32` by default.
- Loading branch information
1 parent
94e21c7
commit daa5254
Showing
19 changed files
with
177 additions
and
70 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
Oops, something went wrong.