Overview
The Lumo UI Plugin uses alumo.properties file in your project root to configure component generation. This file is created automatically when you run ./gradlew lumo --init.
Configuration File
File Name:lumo.properties
Location: Project root directory
Format: Java Properties file (key=value pairs)
Required Properties
ThemeName
The name of your application’s theme.The theme name used throughout your generated components. This should match the name you want to use for your composable theme function.
AppThemeMyAppThemeMainTheme- Any valid Kotlin function name
ComponentsDir
The relative path from the project root to the directory where component files will be generated.Relative path to the components directory. Must match the package name structure.
- Must be a relative path from the project root
- Directory must exist before generating components
- The path structure must match the package name
- Use forward slashes (
/) even on Windows
ComponentsDir=app/src/main/java/com/example/app/uiPackageName=com.example.app.ui- The normalized paths must match:
com.example.app.ui
PackageName
The package name for generated component files.The fully qualified package name where components will be placed. Must match the directory structure.
- Must be a valid Kotlin package name
- Must match the directory structure in
ComponentsDir - Can use backticks for special characters (normalized during validation)
Optional Properties
KotlinMultiplatform
Enable Kotlin Multiplatform support for component generation.Set to
true to generate platform-specific files for Kotlin Multiplatform projects.- Uses multiplatform templates from
templates/multiplatform/ - Generates platform-specific files for different source sets
- Adapts dependency requirements for Compose Multiplatform
- Uses Android templates from
templates/android/ - Generates only Android-specific files
- Uses Android Compose dependencies
KotlinMultiplatform=true, the plugin generates files for:
commonMain- Shared codeandroidMain- Android-specific implementationsiosMain- iOS-specific implementationsdesktopMain- Desktop (JVM) implementationsjsMain- JavaScript implementationswasmJsMain- WebAssembly implementationsmacosMain- macOS-specific implementations
Configuration Examples
Android Project
Kotlin Multiplatform Project
Multi-Module Project
Default Configuration Template
When you run./gradlew lumo --init, the following template is created:
Configuration Validation
The plugin validates your configuration before generating components. Validation checks:Directory Existence
Package Name Mismatch
- Directory:
app/src/main/java/com/example/app/ui - Package:
com.example.app.ui
Missing Properties
lumo.properties file.
Plugin Not Initialized
./gradlew lumo --init to create the configuration file.
Configuration Best Practices
1. Use Consistent Naming
Choose a theme name that reflects your application:2. Match Directory Structure
Ensure your directory path exactly matches your package structure:3. Use Descriptive Directory Names
4. Keep Configuration File in Version Control
Addlumo.properties to your Git repository so team members have the same configuration:
5. Document Custom Configuration
If you use a non-standard directory structure, add comments:Modifying Configuration
You can modify the configuration at any time by editinglumo.properties. Changes take effect immediately for the next command.
Changing the Components Directory
- Create the new directory
- Update
ComponentsDirinlumo.properties - Update
PackageNameto match - Run
./gradlew lumo --setupto verify
Migrating from Android to Multiplatform
- Update
ComponentsDirto point tocommonMain - Set
KotlinMultiplatform=true - Regenerate components
Troubleshooting Configuration
Test Your Configuration
View Configuration File Location
The plugin shows the configuration file path in error messages:Reset Configuration
If you need to reset:- Delete
lumo.properties - Run
./gradlew lumo --init - Reconfigure with correct values