Kotlin Android Extensions & Butterknife are deprecated
See original GitHub issueSummary:
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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (8 by maintainers)
Top GitHub Comments
@misaochan Yes sure, even more than one PR per package would be okay IMO.
I will create a PR with the necessary dependencies and an example so it is easier for first-time contributors to follow up 😃
Looking at Github documentation and feature requests, it seems you cant disable the auto-closing feature and the suggested quick workaround is to avoid the keywords in PR comments that trigger it. So, avoid saying “Fixes #4664” and maybe say something like “This PR relates to #4664” instead. In theory that will generate a link without this issue being closed when the PR merges.