--setup command generates theme files for your project and validates your configuration.
Syntax
What It Does
The setup command performs the following actions:- Validates the
lumo.propertiesconfiguration file - Checks that all required configuration properties are present
- Verifies the output directory structure
- Generates the Theme component with all necessary files
The setup command is essentially a shortcut for
./gradlew lumo --add Theme with configuration validation.Prerequisites
Required configuration inlumo.properties:
ThemeName- Your application theme nameComponentsDir- Path to components directoryPackageName- Package name for generated files
Output
When successful, you’ll see output similar to:Generated Files
The setup command generates theme-related files in your configuredComponentsDir:
Theme.kt
Theme.kt
Main theme file containing:
- Material3 theme configuration
- Color scheme setup
- Typography configuration
- Theme composable function
Color.kt
Color.kt
Color definitions including:
- Light color scheme
- Dark color scheme
- Theme color palette
Type.kt
Type.kt
Typography configuration:
- Font family definitions
- Text style configurations
- Material3 typography setup
Configuration Validation
The setup command validates:Directory paths exist or can be created
Package names are valid
All required properties are configured
Theme name is specified
Error Cases
Using Generated Theme
After running setup, you can use the theme in your composable functions:Kotlin Multiplatform Projects
For Kotlin Multiplatform projects:- Set
KotlinMultiplatform=trueinlumo.properties - Ensure
ComponentsDirpoints to yourcommonMainsource set - The plugin will generate platform-specific files when needed
Next Steps
After setup:- Review generated files - Customize colors and typography as needed
- Add components - Use the add command to add UI components
- Build your app - Start using the theme and components in your application