Skip to content

Kotlin Android Extensions & Butterknife are deprecated #4664

Closed
@psh

Description

@psh

Summary:

Looking at "The future of Kotlin Android Extensions" from 23 November 2020, (see: https://android-developers.googleblog.com/2020/11/the-future-of-kotlin-android-extensions.html)

The deprecation period starts with Kotlin 1.4.20, released today. android-kotlin-extensions will be removed in a future Kotlin release during or after September 2021. Long term, we will continue to maintain the kotlin-parcelize plugin, and you can continue to file issues on Parcelize in the Android Studio issue tracker.

According to Google (https://developer.android.com/topic/libraries/view-binding/migration)

Kotlin Android Extensions is deprecated, which means that using Kotlin synthetics for view binding is no longer supported. If your app uses Kotlin synthetics for view binding, use this guide to migrate to Jetpack view binding.

In addition, the author of Butternife has stated (https://github.com/JakeWharton/butterknife)

Attention: This tool is now deprecated. Please switch to view binding. Existing versions will continue to work, obviously, but only critical bug fixes for integration with AGP will be considered. Feature development and general bug fixes have stopped.

Would you like to work on the issue?

It looks like a pretty big migration, with a large number of files that will be touched. A search for import butterknife.BindView shows 40 files, and import kotlinx.android.synthetic a further 16 files; probably too big for a single person and something to do in stages. I would be happy to be part of the process.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions