CLI
plugin-help
Use --plugin-help
to display all available CLI commands and their functions.
./gradlew lumo --plugin-help
Expected Output
Usage: ./gradlew lumo --option <value>
Options:
--init Initialize Lumo UI Plugin
--setup Setup theme to get started and verify the configs
--required-deps Returns the required dependencies to be added to the build.gradle.kts file
--add <component> Add a new Lumo UI Component
--plugin-help Display this help message
init
Use the --init
command to initialize the plugin. This command creates a lumo.properties
file in the root of your project with default configurations. The output will also display the required dependencies that need to be added to your project’s build files.
./gradlew lumo --init
Expected Output
> Task :lumo
Add the following dependencies to your build.gradle.kts file:
api(platform("androidx.compose:compose-bom:$version"))
api("androidx.compose.foundation:foundation")
api("androidx.compose.foundation:foundation-layout")
api("androidx.compose.ui:ui")
api("androidx.compose.ui:ui-tooling")
api("androidx.compose.ui:ui-tooling-preview")
api("androidx.compose.ui:ui-util")
api("androidx.compose.material:material-ripple:$version")
Default config file created at: lumo.properties (file:///lumo.properties)
Initialised successfully. List of required dependencies printed above.
BUILD SUCCESSFUL in 853ms
setup
Use the --setup
command to generate the theme after configuring properties.
./gradlew lumo --setup
Expected Output
> Task :lumo
Generating Theme ...
'Theme' generated successfully.
Generated files:
Theme.kt (file:///.../ui_components/Theme.kt)
Color.kt (file:///.../ui_components/Color.kt)
Typography.kt (file:///.../ui_components/Typography.kt)
Ripple.kt (file:///.../ui_components/foundation/Ripple.kt)
BUILD SUCCESSFUL in 1s
add
Use the --add
command to generate a new component, e.g. Button
.
./gradlew lumo --add Button
Expected Output
> Task :lumo
Generating Button ...
'Button' generated successfully.
Generated files:
Button.kt (file:////.../ui_components/components/Button.kt)
Surface.kt (file:////.../ui_components/components/Surface.kt)
ButtonElevation.kt (file:////.../ui_components/foundation/ButtonElevation.kt)
BUILD SUCCESSFUL in 630ms
required-deps
Use the --required-deps
command to return the required dependencies to be added to the build.gradle.kts
file.
./gradlew lumo --required-deps
Expected Output
> Task :lumo
Add the following dependencies to your build.gradle.kts file:
api(platform("androidx.compose:compose-bom:$version"))
api("androidx.compose.foundation:foundation")
api("androidx.compose.foundation:foundation-layout")
api("androidx.compose.ui:ui")
api("androidx.compose.ui:ui-tooling")
api("androidx.compose.ui:ui-tooling-preview")
api("androidx.compose.ui:ui-util")
api("androidx.compose.material:material-ripple:$version")
BUILD SUCCESSFUL in 783ms