Nucleus
Get started

Install

Add the Nucleus Gradle plugin to a Kotlin project to build for macOS, Linux, and Windows from a single build.

In this tutorial, you'll add the Nucleus Gradle plugin to a Kotlin project. Once the plugin is applied, the same build can compile, run, and package a desktop app for macOS, Linux, and Windows.

Before you start

Nucleus builds on Compose Multiplatform and requires:

  • JDK 17 or later on your PATH.
  • Kotlin 2.4.10 or later — see Compatibility for the version each Nucleus line needs.
  • Gradle 8.0 or later. The Gradle wrapper bundled with new projects is sufficient.

JDK 25 or later is required only to generate the AOT cache (enableAotCache in nativeDistributions). Any JDK 17+ works for development.

Compatibility

Nucleus VersionKotlin VersionCompose Version
2.5.0 – 2.5.152.4.10+1.12.0
2.0.0 – 2.4.72.4.0+1.11.1

The Compose version is a requirement, not a floor: decorated-window-tao builds against Compose Multiplatform internals that change between minors, so 2.5.x needs 1.12.0 and will not run on 1.11.x. Pin the Compose plugin to the row that matches your Nucleus version.

The Kotlin version is a minimum. Nucleus is compiled with the version in the table, and an older compiler cannot read its metadata.

Apply the plugin

In your module's build.gradle.kts, apply the Nucleus plugin alongside the Kotlin and Compose plugins:

build.gradle.kts
plugins {
    kotlin("jvm") version "2.4.10"
    id("org.jetbrains.compose") version "1.12.0"
    id("dev.nucleusframework") version "2.5.15"
}

The plugins block resolves dev.nucleusframework from the Gradle Plugin Portal, so no extra pluginManagement repository is required.

Add the repositories

Nucleus runtime modules publish to Maven Central under the group dev.nucleusframework. Add the repositories the plugin and its runtime need:

build.gradle.kts
repositories {
    mavenCentral()
    google()
}

Verify the plugin is applied

Applying the plugin registers a nucleus task group. List its tasks to confirm the plugin loaded:

./gradlew tasks --group nucleus

If the command prints the group's tasks, the plugin is applied and you can start building.

What's next

  • Quickstart — write a main function, run a native Tao window, and package an installer.
  • Project setup — repositories, Gradle properties, JDK toolchains, and multi-module layout.
  • Configuration — the full nucleus { } DSL.