-
Notifications
You must be signed in to change notification settings - Fork 544
[One .NET] use API 31 "ref" pack with 32 "runtime" pack #6647
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,10 +122,12 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and | |
<XamarinAndroidVersion>$(AndroidPackVersionLong)</XamarinAndroidVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '%24(TargetPlatformVersion)' == '31.0' "> | ||
<_AndroidRuntimePackId>31</_AndroidRuntimePackId> | ||
<_AndroidRuntimePackVersion>31.0.101-preview.11.117</_AndroidRuntimePackVersion> | ||
<_AndroidTargetingPackId>31</_AndroidTargetingPackId> | ||
<_AndroidTargetingPackVersion>31.0.101-preview.11.117</_AndroidTargetingPackVersion> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<_AndroidTargetingPackId Condition=" '%24(_AndroidTargetingPackId)' == '' ">$(AndroidLatestStableApiLevel)</_AndroidTargetingPackId> | ||
<_AndroidTargetingPackVersion Condition=" '%24(_AndroidTargetingPackVersion)' == '' ">**FromWorkload**</_AndroidTargetingPackVersion> | ||
<_AndroidRuntimePackId Condition=" '%24(_AndroidRuntimePackId)' == '' ">$(AndroidLatestStableApiLevel)</_AndroidRuntimePackId> | ||
<_AndroidRuntimePackVersion Condition=" '%24(_AndroidRuntimePackVersion)' == '' ">**FromWorkload**</_AndroidRuntimePackVersion> | ||
</PropertyGroup> | ||
|
@@ -135,8 +137,8 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and | |
TargetFramework="$(_AndroidNETAppTargetFramework)" | ||
RuntimeFrameworkName="Microsoft.Android" | ||
LatestRuntimeFrameworkVersion="%24(_AndroidRuntimePackVersion)" | ||
TargetingPackName="Microsoft.Android.Ref.%24(_AndroidRuntimePackId)" | ||
TargetingPackVersion="%24(_AndroidRuntimePackVersion)" | ||
TargetingPackName="Microsoft.Android.Ref.%24(_AndroidTargetingPackId)" | ||
TargetingPackVersion="%24(_AndroidTargetingPackVersion)" | ||
RuntimePackNamePatterns="Microsoft.Android.Runtime.%24(_AndroidRuntimePackId).**RID**" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm somewhat concerned about the approach to compile and run against different API levels. This reminds me of a very old issue we ran into when updating the shared runtime to always include the latest Mono.Android.dll - https://github.com/xamarin/androidtools/commit/0b7bcd77f1519d2928d9c8e619610ee2afe44786. Perhaps that particular point of failure is no longer an issue in API 31+, as I think default interface methods in Java may have helped with this case? I can't think of any other scenarios that might break with this approach, but maybe @jonpryor has some additional thoughts here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Historical context: xamarin/androidtools@0b7bcd7 fixes Xamarin Bugzilla 22074, in which a xamarin/androidtools@0b7bcd7 (2014-Aug) predates Today, with .NET 6, this shouldn't be a concern: we can now rely on C#8 default interface members, thus preserving API and ABI compatibility from lower API levels through higher API levels -- which means we could possibly consider dropping |
||
RuntimePackRuntimeIdentifiers="@(_AndroidNETAppRuntimePackRids, '%3B')" | ||
Profile="Android" | ||
|
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.
Do we still need to use these
_AndroidRuntimePackId
_AndroidRuntimePackVersion
based conditions if we aren't setting them anywhere anymore? Though I guess it doesn't hurt to keep them if we would want an easy way to override these for whatever reason.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.
I left
$(_AndroidRuntimePackId)
and$(_AndroidRuntimePackVersion)
as private properties. They might be useful to be able to put them in a project file for debugging something down the road.