Find Fragment.setRetainInstance(true) calls

Proprietary

Fragment.setRetainInstance(true) was deprecated in Fragment 1.3 because retained fragments break process-death restoration and tangle the lifecycle owner with the host activity. Move retained state to a ViewModel scoped to the navigation host.

org.openrewrite.kotlin.android.FindFragmentSetRetainInstance$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.android.FindFragmentSetRetainInstance$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.