Skip to content
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

Remove the default SupportedOSPlatformVersion value #9260

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
<_GetChildProjectCopyToPublishDirectoryItems>false</_GetChildProjectCopyToPublishDirectoryItems>
<UseMonoRuntime Condition=" '$(UseMonoRuntime)' == '' ">true</UseMonoRuntime>

<!-- Use $(AndroidMinimumSupportedApiLevel) for $(SupportedOSPlatformVersion) if unset -->
<SupportedOSPlatformVersion Condition=" '$(SupportedOSPlatformVersion)' == '' ">$(AndroidMinimumSupportedApiLevel)</SupportedOSPlatformVersion>
Comment on lines -29 to -30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rolfbjarne from your memory of the meeting, should we actually leave this in and add a similar default in xamarin/xamarin-macios?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talked about doing it either way:

  • Switch the default to the minimum across all workloads.
  • Not set a default in any SDK workload, and make MAUI/Blazor/whomever set a default value.

Note that the spec says "Project files may specify a SupportedOSPlatformVersion property, and if they do not it will default to OS Version equivalent to the OS API version specified in the TargetPlatformVersion value."

I don't know what Google does with Android, but Xcode does more or less the same thing, defaults to the latest OS version.

I think either way can work, although I lean a little bit towards the latter (it's what the spec says, but I might also be influenced by the fact that I wouldn't have to do anything...). I also think the latter way works better if MAUI/Blazor/whomever wants a different default than the min supported by the SDK.

<!-- $(SupportedOSPlatformVersion) must be '21.0', but we should support integer values like '21' -->
<SupportedOSPlatformVersion Condition=" '$(SupportedOSPlatformVersion)' != '' and !$(SupportedOSPlatformVersion.Contains('.')) ">$(SupportedOSPlatformVersion).0</SupportedOSPlatformVersion>

mattleibow marked this conversation as resolved.
Show resolved Hide resolved
<!-- Bindings properties -->
<!-- jar2xml is not supported -->
<AndroidClassParser>class-parse</AndroidClassParser>
Expand Down
Loading