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

[Mono.Android] Obsolete Mono.Android.dll for < API-19 #2329

Merged
merged 1 commit into from
Oct 23, 2018

Conversation

jonpryor
Copy link
Member

@jonpryor jonpryor commented Oct 22, 2018

Fixes: http://work.devdiv.io/712427

For the next major release of Visual Studio, Xamarin.Android will stop
building and distributing Mono.Android.dll for:

  • v2.3 (API-10)
  • v4.0.3 (API-15)
  • v4.1 (API-16)
  • v4.2 (API-17)
  • v4.3 (API-18)

This will be done for the following reasons:

  1. Support for API-10 and API-15 will be dropped from the
    Android NDK:

    Support for ICS (android-14 and android-15) will be removed from r18

  2. The Android Support Library, as of release 26.0.0
    (July 2017), requires API-14 or higher:

    Starting with Support Library version 26.0.0 (released in July 2017),
    the minimum supported API level has changed to Android 4.0 (API level 14)
    for all support library packages.

  3. The Android Support Library replacement, AndroidX, requires
    a compileSdkVersion minimum value of API-28 (v9.0).

  4. As of 2018-Oct-22, the Android Distribution Dashboard shows
    that only ~3.8% of devices hitting the Google Play Store are
    running Android 4.3 (API-18) or earlier.

We want to provide a "heads-up" that these assemblies will be removed,
to give our customers an opportunity to bump their
$(TargetFrameworkVersion) to v4.4 or later.

To do so, add /package/class/@deprecated and
/package/interface/@deprecated XML attribute to all bound types,
via metadata, for API levels 1 through 18. This will cause all
types to contain the following additional [Obsolete]:

[ObsoleteAttribute (@"The assembly `Mono.Android.dll` for this API level will be removed in a future release.  Please bump your `$(TargetFrameworkVersion)` to be v4.4 or greater.")]

If one of these types is used from a project referencing a
Mono.Android.dll of v4.3 or earlier, the compiler will generate the
following warning for all such referenced types:

MainActivity.cs(30,30): Warning CS0618: 'Activity' is obsolete:
'The assembly `Mono.Android.dll` for this API level will be removed in a future release.
Please bump your `$(TargetFrameworkVersion)` to be v4.4 or greater.'

@jonpryor jonpryor force-pushed the jonp-obsolete-mono-android-types branch from c19c1e1 to 6739bc7 Compare October 22, 2018 19:51
@brendanzagaeski
Copy link
Contributor

Just as a tiny wording question, maybe "update" would be a more familiar term for a variety of users as compared to "bump?"

Fixes: http://work.devdiv.io/712427

For the next major release of Visual Studio, Xamarin.Android will stop
building and distributing `Mono.Android.dll` for:

  * v2.3 (API-10)
  * v4.0.3 (API-15)
  * v4.1 (API-16)
  * v4.2 (API-17)
  * v4.3 (API-18)

This will be done for the following reasons:

 1. Support for API-10 and API-15 will be dropped from the
    [Android NDK][0]:

    > Support for ICS (android-14 and android-15) will be removed from r18

 2. The [Android Support Library][1], as of release 26.0.0
    (July 2017), requires API-14 or higher:

    > Starting with Support Library version 26.0.0 (released in July 2017),
    > the minimum supported API level has changed to Android 4.0 (API level 14)
    > for all support library packages.

 3. The Android Support Library replacement, [AndroidX][2], requires
    a `compileSdkVersion` minimum value of API-28 (v9.0).

 4. As of 2018-Oct-22, the [Android Distribution Dashboard][3] shows
    that only ~3.8% of devices hitting the Google Play Store are
    running Android 4.3 (API-18) or earlier.

We want to provide a "heads-up" that these assemblies will be removed,
to give our customers an opportunity to bump their
`$(TargetFrameworkVersion)` to v4.4 or later.

To do so, add `/package/class/@deprecated` and
`/package/interface/@deprecated` XML attribute to *all bound types*,
via `metadata`, for API levels 1 through 18.  This will cause all
types to contain the following additional `[Obsolete]`:

	[ObsoleteAttribute (@"The assembly `Mono.Android.dll` for this API level will be removed in a future release.  Please bump your `$(TargetFrameworkVersion)` to be v4.4 or greater.")]

If one of these types is used from a project referencing a
`Mono.Android.dll` of v4.3 or earlier, the compiler will generate the
following warning for all such referenced types:

	MainActivity.cs(30,30): Warning CS0618: 'Activity' is obsolete:
	'The assembly `Mono.Android.dll` for this API level will be removed in a future release.
	Please bump your `$(TargetFrameworkVersion)` to be v4.4 or greater.'

[0]: https://developer.android.com/ndk/downloads/revision_history
[1]: https://developer.android.com/topic/libraries/support-library/
[2]: https://developer.android.com/jetpack/androidx/
[3]: https://developer.android.com/about/dashboards/
@jonpryor jonpryor force-pushed the jonp-obsolete-mono-android-types branch from 6739bc7 to b1c9d96 Compare October 23, 2018 13:02
@jonpryor jonpryor merged commit 66e1b65 into dotnet:master Oct 23, 2018
jonpryor added a commit that referenced this pull request Oct 23, 2018
Fixes: http://work.devdiv.io/712427

For the next major release of Visual Studio, Xamarin.Android will stop
building and distributing `Mono.Android.dll` for:

  * v2.3 (API-10)
  * v4.0.3 (API-15)
  * v4.1 (API-16)
  * v4.2 (API-17)
  * v4.3 (API-18)

This will be done for the following reasons:

 1. Support for API-10 and API-15 will be dropped from the
    [Android NDK][0]:

    > Support for ICS (android-14 and android-15) will be removed from r18

 2. The [Android Support Library][1], as of release 26.0.0
    (July 2017), requires API-14 or higher:

    > Starting with Support Library version 26.0.0 (released in July 2017),
    > the minimum supported API level has changed to Android 4.0 (API level 14)
    > for all support library packages.

 3. The Android Support Library replacement, [AndroidX][2], requires
    a `compileSdkVersion` minimum value of API-28 (v9.0).

 4. As of 2018-Oct-22, the [Android Distribution Dashboard][3] shows
    that only ~3.8% of devices hitting the Google Play Store are
    running Android 4.3 (API-18) or earlier.

We want to provide a "heads-up" that these assemblies will be removed,
to give our customers an opportunity to bump their
`$(TargetFrameworkVersion)` to v4.4 or later.

To do so, add `/package/class/@deprecated` and
`/package/interface/@deprecated` XML attribute to *all bound types*,
via `metadata`, for API levels 1 through 18.  This will cause all
types to contain the following additional `[Obsolete]`:

	[ObsoleteAttribute (@"The assembly `Mono.Android.dll` for this API level will be removed in a future release.  Please bump your `$(TargetFrameworkVersion)` to be v4.4 or greater.")]

If one of these types is used from a project referencing a
`Mono.Android.dll` of v4.3 or earlier, the compiler will generate the
following warning for all such referenced types:

	MainActivity.cs(30,30): Warning CS0618: 'Activity' is obsolete:
	'The assembly `Mono.Android.dll` for this API level will be removed in a future release.
	Please bump your `$(TargetFrameworkVersion)` to be v4.4 or greater.'

[0]: https://developer.android.com/ndk/downloads/revision_history
[1]: https://developer.android.com/topic/libraries/support-library/
[2]: https://developer.android.com/jetpack/androidx/
[3]: https://developer.android.com/about/dashboards/
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants