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

Prevent `$(AndroidUseLatestPlatformSdk)` from using Unstable APIs #1221

Closed
dellis1972 opened this Issue Jan 23, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@dellis1972
Contributor

dellis1972 commented Jan 23, 2018

Currently if a user sets $(AndroidUseLatestPlatformSdk) the system will pickup the very latest binding target framework, regardless of if it is stable or not.

What we should be doing is using the latest Stable API rather than just grabbing the max.
That said we still want the user to be able to use the unstable API if they really want to. So regardless of $(AndroidUseLatestPlatformSdk) is set to true, if the user has set the $(TargetFrameworkVersion) to the value of an unstable API we should allow the user to use it.

So the new logic is as follows

  1. $(AndroidUseLatestPlatformSdk) = true, use the latest stable API
  2. $(TargetFrameworkVersion) = and unstable version and $(AndroidUseLatestPlatformSdk) = false, use the $(TargetFrameworkVersion).
    3.$(TargetFrameworkVersion) = and unstable version and $(AndroidUseLatestPlatformSdk) = true, use the $(TargetFrameworkVersion)

@dellis1972 dellis1972 added this to the d15-7 milestone Jan 23, 2018

@dellis1972 dellis1972 self-assigned this Jan 23, 2018

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Jan 24, 2018

[Xamarin.Android.Build.Tasks] Prevent `$(AndroidUseLatestPlatformSdk)…
…` from using Unstable APIs

Fixes xamarin#1221

Currently when a user sets `$(AndroidUseLatestPlatformSdk)` it will
automatically use the Max ApiLevel. This is not always a stable
ApiLevel. It is highly possible that it will be unstable.
Users will generally want to keep to the Max Stable in this senario.

This commit alters the code so that we use the latest Max Stable
ApiLevel when using `$(AndroidUseLatestPlatformSdk)`.
However we should still allow users to use the unstable ones if
they really want to. This can be achieved in a number of ways

1. Turn off `$(AndroidUseLatestPlatformSdk)` and set the
`$(TargetFrameworkVersion)` directly.

2. Leave `$(AndroidUseLatestPlatformSdk)` on and set the
`$(TargetFrameworkVersion)` directly.

So effectviely, just manually target the unstable Api. But it
is something the user will need to think about and do manaully.
By default we will only use to the latest stable ApiLevel.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Feb 1, 2018

[Xamarin.Android.Build.Tasks] Prevent `$(AndroidUseLatestPlatformSdk)…
…` from using Unstable APIs

Fixes xamarin#1221

Currently when a user sets `$(AndroidUseLatestPlatformSdk)` it will
automatically use the Max ApiLevel. This is not always a stable
ApiLevel. It is highly possible that it will be unstable.
Users will generally want to keep to the Max Stable in this senario.

This commit alters the code so that we use the latest Max Stable
ApiLevel when using `$(AndroidUseLatestPlatformSdk)`.
However we should still allow users to use the unstable ones if
they really want to. This can be achieved in a number of ways

1. Turn off `$(AndroidUseLatestPlatformSdk)` and set the
`$(TargetFrameworkVersion)` directly.

2. Leave `$(AndroidUseLatestPlatformSdk)` on and set the
`$(TargetFrameworkVersion)` directly.

So effectviely, just manually target the unstable Api. But it
is something the user will need to think about and do manaully.
By default we will only use to the latest stable ApiLevel.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Feb 7, 2018

[Xamarin.Android.Build.Tasks] Prevent `$(AndroidUseLatestPlatformSdk)…
…` from using Unstable APIs

Fixes xamarin#1221

Currently when a user sets `$(AndroidUseLatestPlatformSdk)` it will
automatically use the Max ApiLevel. This is not always a stable
ApiLevel. It is highly possible that it will be unstable.
Users will generally want to keep to the Max Stable in this senario.

This commit alters the code so that we use the latest Max Stable
ApiLevel when using `$(AndroidUseLatestPlatformSdk)`.
However we should still allow users to use the unstable ones if
they really want to. This can be achieved in a number of ways

1. Turn off `$(AndroidUseLatestPlatformSdk)` and set the
`$(TargetFrameworkVersion)` directly.

2. Leave `$(AndroidUseLatestPlatformSdk)` on and set the
`$(TargetFrameworkVersion)` directly.

So effectviely, just manually target the unstable Api. But it
is something the user will need to think about and do manaully.
By default we will only use to the latest stable ApiLevel.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Feb 7, 2018

[Xamarin.Android.Build.Tasks] Prevent `$(AndroidUseLatestPlatformSdk)…
…` from using Unstable APIs

Fixes xamarin#1221

Currently when a user sets `$(AndroidUseLatestPlatformSdk)` it will
automatically use the Max ApiLevel. This is not always a stable
ApiLevel. It is highly possible that it will be unstable.
Users will generally want to keep to the Max Stable in this senario.

This commit alters the code so that we use the latest Max Stable
ApiLevel when using `$(AndroidUseLatestPlatformSdk)`.
However we should still allow users to use the unstable ones if
they really want to. This can be achieved in a number of ways

1. Turn off `$(AndroidUseLatestPlatformSdk)` and set the
`$(TargetFrameworkVersion)` directly.

2. Leave `$(AndroidUseLatestPlatformSdk)` on and set the
`$(TargetFrameworkVersion)` directly.

So effectviely, just manually target the unstable Api. But it
is something the user will need to think about and do manaully.
By default we will only use to the latest stable ApiLevel.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Feb 13, 2018

[Xamarin.Android.Build.Tasks] Prevent `$(AndroidUseLatestPlatformSdk)…
…` from using Unstable APIs

Fixes xamarin#1221

Currently when a user sets `$(AndroidUseLatestPlatformSdk)` it will
automatically use the Max ApiLevel. This is not always a stable
ApiLevel. It is highly possible that it will be unstable.
Users will generally want to keep to the Max Stable in this senario.

This commit alters the code so that we use the latest Max Stable
ApiLevel when using `$(AndroidUseLatestPlatformSdk)`.
However we should still allow users to use the unstable ones if
they really want to. This can be achieved in a number of ways

1. Turn off `$(AndroidUseLatestPlatformSdk)` and set the
`$(TargetFrameworkVersion)` directly.

2. Leave `$(AndroidUseLatestPlatformSdk)` on and set the
`$(TargetFrameworkVersion)` directly.

So effectviely, just manually target the unstable Api. But it
is something the user will need to think about and do manaully.
By default we will only use to the latest stable ApiLevel.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Feb 14, 2018

[Xamarin.Android.Build.Tasks] Prevent `$(AndroidUseLatestPlatformSdk)…
…` from using Unstable APIs

Fixes xamarin#1221

Currently when a user sets `$(AndroidUseLatestPlatformSdk)` it will
automatically use the Max ApiLevel. This is not always a stable
ApiLevel. It is highly possible that it will be unstable.
Users will generally want to keep to the Max Stable in this senario.

This commit alters the code so that we use the latest Max Stable
ApiLevel when using `$(AndroidUseLatestPlatformSdk)`.
However we should still allow users to use the unstable ones if
they really want to. This can be achieved in a number of ways

1. Turn off `$(AndroidUseLatestPlatformSdk)` and set the
`$(TargetFrameworkVersion)` directly.

2. Leave `$(AndroidUseLatestPlatformSdk)` on and set the
`$(TargetFrameworkVersion)` directly.

So effectviely, just manually target the unstable Api. But it
is something the user will need to think about and do manaully.
By default we will only use to the latest stable ApiLevel.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Feb 19, 2018

[Xamarin.Android.Build.Tasks] Prevent `$(AndroidUseLatestPlatformSdk)…
…` from using Unstable APIs

Fixes xamarin#1221

Currently when a user sets `$(AndroidUseLatestPlatformSdk)` it will
automatically use the Max ApiLevel. This is not always a stable
ApiLevel. It is highly possible that it will be unstable.
Users will generally want to keep to the Max Stable in this senario.

This commit alters the code so that we use the latest Max Stable
ApiLevel when using `$(AndroidUseLatestPlatformSdk)`.
However we should still allow users to use the unstable ones if
they really want to. This can be achieved in a number of ways

1. Turn off `$(AndroidUseLatestPlatformSdk)` and set the
`$(TargetFrameworkVersion)` directly.

2. Leave `$(AndroidUseLatestPlatformSdk)` on and set the
`$(TargetFrameworkVersion)` directly.

So effectviely, just manually target the unstable Api. But it
is something the user will need to think about and do manaully.
By default we will only use to the latest stable ApiLevel.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Feb 20, 2018

[Xamarin.Android.Build.Tasks] Prevent `$(AndroidUseLatestPlatformSdk)…
…` from using Unstable APIs

Fixes xamarin#1221

Currently when a user sets `$(AndroidUseLatestPlatformSdk)` it will
automatically use the Max ApiLevel. This is not always a stable
ApiLevel. It is highly possible that it will be unstable.
Users will generally want to keep to the Max Stable in this senario.

This commit alters the code so that we use the latest Max Stable
ApiLevel when using `$(AndroidUseLatestPlatformSdk)`.
However we should still allow users to use the unstable ones if
they really want to. This can be achieved in a number of ways

1. Turn off `$(AndroidUseLatestPlatformSdk)` and set the
`$(TargetFrameworkVersion)` directly.

2. Leave `$(AndroidUseLatestPlatformSdk)` on and set the
`$(TargetFrameworkVersion)` directly.

So effectviely, just manually target the unstable Api. But it
is something the user will need to think about and do manaully.
By default we will only use to the latest stable ApiLevel.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Feb 23, 2018

[Xamarin.Android.Build.Tasks] Prevent `$(AndroidUseLatestPlatformSdk)…
…` from using Unstable APIs

Fixes xamarin#1221

Currently when a user sets `$(AndroidUseLatestPlatformSdk)` it will
automatically use the Max ApiLevel. This is not always a stable
ApiLevel. It is highly possible that it will be unstable.
Users will generally want to keep to the Max Stable in this senario.

This commit alters the code so that we use the latest Max Stable
ApiLevel when using `$(AndroidUseLatestPlatformSdk)`.
However we should still allow users to use the unstable ones if
they really want to. This can be achieved in a number of ways

1. Turn off `$(AndroidUseLatestPlatformSdk)` and set the
`$(TargetFrameworkVersion)` directly.

2. Leave `$(AndroidUseLatestPlatformSdk)` on and set the
`$(TargetFrameworkVersion)` directly.

So effectviely, just manually target the unstable Api. But it
is something the user will need to think about and do manaully.
By default we will only use to the latest stable ApiLevel.

jonpryor added a commit that referenced this issue Feb 23, 2018

[Xamarin.Android.Build.Tasks] `$(AndroidUseLatestPlatformSdk)` uses S…
…TABLE levels (#1228)

Fixes: #1221

Currently when a user sets `$(AndroidUseLatestPlatformSdk)` it will
automatically use the maximum known API level. This is not always a
stable ApiLevel, e.g. when a preview API level has been bound, and
the binding has been installed.

Users will generally want to use the maximum *stable* API level when
`$(AndroidUseLatestPlatformSdk)` is True.

Alters things so that we use the maximum Stable API level when
`$(AndroidUseLatestPlatformSdk)` is True.

However, allow users to use unstable API levels if desired. This can
be achieved by setting `$(TargetFrameworkVersion)` to the desired
unstable framework version. (For example, when API-O was in preview,
this would be `v7.99`. When API-P is presumably announced, it will be
bound as `v8.99`.)

This will require a *manual* change to the `.csproj`, as we do not
anticipate the IDEs showing unstable API levels (though this could
plausibly be done with sufficient warnings...).

jonpryor added a commit that referenced this issue Feb 27, 2018

[Xamarin.Android.Build.Tasks] `$(AndroidUseLatestPlatformSdk)` uses S…
…TABLE levels (#1228)

Fixes: #1221

Currently when a user sets `$(AndroidUseLatestPlatformSdk)` it will
automatically use the maximum known API level. This is not always a
stable ApiLevel, e.g. when a preview API level has been bound, and
the binding has been installed.

Users will generally want to use the maximum *stable* API level when
`$(AndroidUseLatestPlatformSdk)` is True.

Alters things so that we use the maximum Stable API level when
`$(AndroidUseLatestPlatformSdk)` is True.

However, allow users to use unstable API levels if desired. This can
be achieved by setting `$(TargetFrameworkVersion)` to the desired
unstable framework version. (For example, when API-O was in preview,
this would be `v7.99`. When API-P is presumably announced, it will be
bound as `v8.99`.)

This will require a *manual* change to the `.csproj`, as we do not
anticipate the IDEs showing unstable API levels (though this could
plausibly be done with sufficient warnings...).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment