Skip to main content

Prerequisites

Before installing Lumo UI, ensure your project meets these requirements:
  • Gradle 7.0 or higher
  • Kotlin 1.9.0 or higher
  • Jetpack Compose (for Android) or Compose Multiplatform
  • Android SDK 24+ (for Android projects)

Add the plugin

Android project

Add the Lumo UI plugin to your app’s build.gradle.kts file:
plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
    id("org.jetbrains.kotlin.plugin.compose")
    id("com.nomanr.plugin.lumo") version "1.2.5"
}

android {
    namespace = "com.example.myapp"
    compileSdk = 35

    defaultConfig {
        applicationId = "com.example.myapp"
        minSdk = 24
        targetSdk = 35
        versionCode = 1
        versionName = "1.0"
    }

    buildFeatures {
        compose = true
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = "17"
    }
}

dependencies {
    // Required Compose dependencies
    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")

    implementation("androidx.activity:activity-compose:1.9.0")
}

Kotlin Multiplatform project

For Kotlin Multiplatform projects that target Android, iOS, Desktop, and Web:
plugins {
    kotlin("multiplatform")
    id("com.android.library")
    id("org.jetbrains.compose")
    id("org.jetbrains.kotlin.plugin.compose")
    id("com.nomanr.plugin.lumo") version "1.2.5"
}

kotlin {
    androidTarget {
        compilations.all {
            kotlinOptions {
                jvmTarget = "17"
            }
        }
    }

    jvm("desktop")

    listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64()
    ).forEach { iosTarget ->
        iosTarget.binaries.framework {
            baseName = "shared"
            isStatic = true
        }
    }

    js(IR) {
        browser()
    }

    sourceSets {
        val commonMain by getting {
            dependencies {
                // Required Compose Multiplatform dependencies
                api(compose.runtime)
                api(compose.foundation)
                api(compose.material3)
                api(compose.ui)
            }
        }
    }
}

android {
    namespace = "com.example.myapp.shared"
    compileSdk = 35

    defaultConfig {
        minSdk = 24
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
}

Verify installation

After adding the plugin, verify it’s installed correctly by running:
Terminal
./gradlew lumo --plugin-help
You should see the help message with available options:
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
If you see this help message, the plugin is installed correctly and you’re ready to proceed with initialization.

Check required dependencies

To see the full list of required dependencies for your project type, run:
./gradlew lumo --required-deps
The plugin will automatically detect your project type and show the appropriate dependencies.
Make sure all required Compose dependencies are added to your build.gradle.kts file before generating components. Missing dependencies will cause compilation errors.

Next steps

Quickstart

Initialize the plugin and generate your first component

Configuration

Learn about the lumo.properties configuration file

Build docs developers (and LLMs) love