-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Replace Synthetic Accessors with ViewBinding #14845
Comments
👋 @zwarm !
Should we add a separate task to fix all occurrences of that as well? |
Yes, I moved the line out of notes and into tasks. 👍 |
The last PR was merged to |
Release Notes: https://github.com/JetBrains/kotlin/releases/tag/v1.6.20 ------------------------------------------------------------------------ This is a tmp solution which will be removed once the 'Catalog' related Automattic/android-dependency-catalog#20 PR gets ready for review and the CI is able to publish the new catalog. ------------------------------------------------------------------------ FYI: Instead of updating Kotlin to this newer '1.6.20' patch version, a better alternative would have been to replace the deprecated 'kotlin-android-extensions' plugin with 'kotlin-parcelize'. However, doing such a migration is not trivial and will require a lot of work. For instance, one could search for all the 'kotlinx.android.synthetic' and 'kotlinx.android.parcel' related imports. Those would need to be replaced with 'ViewBinding' and 'kotlinx.parcelize' respectively. As a reference see WPAndroid such issues and their multiple PRs: - Replace Synthetic Accessors with ViewBinding #14845 wordpress-mobile/WordPress-Android#14845 - ViewBinding: Remove Kotlin Android Extensions (Replace with Kotlin Parcelize) #14902 wordpress-mobile/WordPress-Android#14902
Tasks
Upgrade Kotlin to 1.4.20 @zwarm ViewBinding: Update Kotlin version to 1.4.20 #14843
WPAndroid Standalone classes @zwarm ViewBinding: Replace synthetic accessors with ViewBinding #14837
EngagedPeopleListActivity
EngagedPeopleListFragment
HistoryDetailActivity
JetpackRemoteInstallActivity
JetpackRemoteInstallFragment
PostSignupInterstitialActivity
SearchListFragment
SuggestionActivity
UnifiedCommentsActivity
WPAndroid - instances in which includes call other includes @ParaskP7 ViewBinding: Replace Synthetic Accessors in Model Layout/Hope Page Picker Screens #14865
ModalLayoutPickerFragment
HomePagePickerFragment
WPAndroid - SiteCreationBaseFormFragment children @zwarm ViewBinding: Remove synthetic accessors: Site Creation #14871
SiteCreationDomainsFragment
SiteCreationPreviewFragment
WPAndroid - LayoutPreviewFragment children/dialogs/viewholders @zwarm ViewBinding: Replace synthetic accessors in LayoutPreviewFragment and children #14847
CategoryViewHolder
LayoutPreviewFragment
LayoutViewHolder
BlockLayoutPreviewFragment
DesignPreviewFragment
Refactor DomainRegistrationActivity and PostsListActivity to match SuggestionActivity @ParaskP7 ViewBinding: Refactor Domain Registration and Posts List Activities #14868
Refactor HelpActivity to match SuggestionActivity (same as above) @zwarm ViewBinding: Refactor: call binding=null after super.onDestroyView() #14873
Libraries @ParaskP7
stories-android
@malinajirka stories-android#702stories-android
Integration PR @malinajirka Update stories - removal of deprecated kotlin-android-extensions #14928image-editor
@ParaskP7 ViewBinding: Replace Synthetic Accessors in Image Editor #14854editor
@ParaskP7 (FYI: This module is using thekotlin-android-extensions
plugin for the@Parcelize
annotations only, as it is not using anykotlinx.android.synthetic
imports. As such, there is no work that needs to be done there. The only work that is required for this module is to replace thekotlin-android-extensions
withkotlin-parcelize
, update the@Parcelize
imports and suppress the false positive Lint warning associated with this change)Ensure
binding = null
is called aftersuper.onDestroyView()
when bindings are used in fragments with property access @ParaskP7 ViewBinding: Fix Binding forOnDestroyView
#14869Undo backing field
_binding
and usebinding?.
inLayoutPreviewFragment
andSiteSettingsTimezoneBottomSheet
@zwarm ViewBinding: Refactor: Remove view binding backing fields #14872Remove
kotlin-android-extensions
and update tokotlin-parcelize
where needed. (Needs to be done after all above PRs have been merged to develop) @ParaskP7 ViewBinding: Remove Kotlin Android Extensions (Replace with Kotlin Parcelize) #14902Notes
with
pattern as first choice, if situation calls for field, then useprivate var lateinit
patternThe text was updated successfully, but these errors were encountered: