Provides a set of templates for scaffolding architectural repetitive tasks.
Install the Cookpad Android Studio Templates
IntellJ plugin in Android Studio. Instructions for how to install any plugin.
This template adds all the required components to create a new feature based on the config provided by the user.
- Click with right button on the module that you want to create the new feature.
- Select
New -> Other -> Cookpad Feature Screen
.
- Write the name of the new feature.
- In the drop-down list "Add pagination support", you can choose between "none" and "Standard pagination".
- In the drop-down list "Add delegation support", you can choose between "none", "a viewModel delegate" and "a viewModel delegate and a view delegate".
This template add a new Android Gradle module with all the basic setup that we usually require when creating a a new module.
- Click with right button on any existing Gradle module (Android Studio does not allow to use template outside a preexisting Android module).
- Select
New -> Application -> Cookpad Module
.
- Write the name of the new module.
Screen template
relies in two custom components declared inside the non-published Cookpad code base: SingleLiveData, used for emitting events with LiveData only one time -no caching, and FragmentViewBindingDelegate to bind the view and clear the view binding once the fragment view is destroyed. You will need to replace that parts by an analogous implementation.- The injection of dependencies is done via Koin.