/composeArchitecturePlugin

Compose Architecture Plugin

Primary LanguageKotlinApache License 2.0Apache-2.0

Build

Compose Architecture Plugin

The Compose Architecture Plugin is a powerful tool that enhances the development of new Jetpack Compose features by providing pre-defined templates. These templates enable developers to accelerate their workflow when creating new Jetpack Compose UI Architecture.

New Feature Dialog

The New Feature Dialog is a convenient feature of the plugin that simplifies the creation of various files related to Jetpack Compose UI Architecture. Once you provide a name for your feature, the plugin will automatically generate the following files and directories:

  • [featName] - Package (lowercase) (optional)
    • [state][FeatName]UiState - This file contains the UIState, which serves as the main state holder for the screen.
    • [ui][FeatName]Screen - An empty screen file with a preview, allowing you to quickly visualize the initial layout.
    • [ui][components] - An empty package that you can use to organize your UI components.
    • [event][FeatName]Event - This file defines the events specific to your screen.
    • [listener][FeatName]InteractionListener - A file responsible for controlling the UI logic and interactions of the screen.
    • [viewModel][FeatName]ViewModel - A basic implementation of the viewModel for your feature.

In addition to the feature-specific files, the plugin also generates the following files as a foundation for your project:

  • [base]BaseViewModel - A basic implementation of the base viewModel with helper functions, providing a starting point for your feature's view models.
  • [base]ErrorState - A basic data class designed to hold error state information.
  • [utils][extensions]eventListener - An extension function that simplifies listening to UI events.

With the Compose Architecture Plugin, you can streamline your development process and focus on building robust Jetpack Compose features without having to manually create boilerplate code.