Skip to main content
The --init command creates the default configuration file required by the Lumo UI plugin.

Syntax

./gradlew lumo --init

What It Does

The init command performs the following actions:
  1. Checks if lumo.properties already exists
  2. Creates a new lumo.properties file in your project root
  3. Populates it with default configuration template
  4. Displays required dependencies for your project

Output

When successful, you’ll see:
Default config file created at: /path/to/project/lumo.properties

The plugin requires the following dependencies to your build.gradle.kts file:
api(platform("androidx.compose:compose-bom:2024.12.01"))
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:1.7.6")
Note: Ignore this message if you have already added the dependencies.

Initialised successfully. List of required dependencies printed above.
For Kotlin Multiplatform projects, the dependencies list will show Compose Multiplatform dependencies instead.

Generated Configuration File

The command creates a lumo.properties file with this template:
# Lumo UI Plugin
# This file is used to store configurations for the Lumo UI Plugin
# Do not delete this file

ThemeName=AppTheme
ComponentsDir=<<relative-path-to-components-dir-from-root>>
PackageName=<<component-files-package-name>>
# Uncomment this line if you are using Kotlin Multiplatform
# KotlinMultiplatform=false

Configuration Parameters

ThemeName
string
required
The name of your application’s theme. This will be used in generated component files.Example: AppTheme, MyAppTheme
ComponentsDir
string
required
Relative path from project root to the directory where component files will be generated.Example: app/src/main/java/com/example/ui/components
PackageName
string
required
The package name for generated component files.Example: com.example.ui.components
KotlinMultiplatform
boolean
default:"false"
Set to true if you’re using Kotlin Multiplatform. This changes the dependency requirements and code generation behavior.

Error Cases

Already InitializedIf you run --init when lumo.properties already exists:
Lumo UI plugin is already initialised. The config file can be found here: /path/to/lumo.properties
To reinitialize, delete the existing file first.

Next Steps

After initialization:
  1. Edit the configuration file - Replace placeholder values with your actual project paths and package names
  2. Add required dependencies - Copy the displayed dependencies to your build.gradle.kts file
  3. Run setup - Use the setup command to generate theme files and verify configuration
# Edit lumo.properties with your project details
vim lumo.properties

# Verify configuration and setup theme
./gradlew lumo --setup

Example Workflow

# Initialize plugin
./gradlew lumo --init

# Edit configuration
cat > lumo.properties << EOF
ThemeName=MyAppTheme
ComponentsDir=app/src/main/java/com/example/ui/components
PackageName=com.example.ui.components
EOF

# Add dependencies to build.gradle.kts
# (copy from init output)

# Setup theme
./gradlew lumo --setup
Keep the lumo.properties file in version control so all team members have the same configuration.

Build docs developers (and LLMs) love