Skip to content

v5 to v6+ migration guide #170

@jolaf

Description

@jolaf

Cicerone migration to Kotlin in v6.0 changed the project structure seriously, so code that worked for v5 in many cases can't be formally migrated to v6+, and moreover, sometimes even the proper approach to migration is unclear. It would be nice to have some guide or recommendations on suggested migration strategy.

Personally, I have a v5-based project that was written before me and that I now have to support and improve, and this issue really got me stuck. Any help would be appreciated.

Here are some existing patterns I have trouble migrating:

class MyScreen : SupportAppScreen() {
    override fun getFragment(): Fragment { // New API requires factory
        return MyFragment()
    }
}

class MyNavigator(val activity: FragmentActivity, containerId: Int)
        : SupportAppNavigator(activity, containerId) {
    override fun setupFragmentTransaction(
        command: Command, // Argument missing in v6.0
        currentFragment: Fragment?,
        nextFragment: Fragment?,
        fragmentTransaction: FragmentTransaction
    ) {
    ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions