kotlin-tools

Gradle Plugins

A collection of Gradle plugins for building applications and libraries using Kotlin.

These plugins all target Kotlin 2.4.0 and Java 21 (for Kotlin libraries), Java 25 (for Kotlin apps) and Java 17 (for Gradle plugins). The plugins require Gradle 9.0 or later and Java 17 or later.

Settings plugins

net.rubygrapefruit.kotlin-base

A settings plugin that must be applied to the settings of any build that uses these plugins.

Native applications

net.rubygrapefruit.native.cli-app

Builds a command-line application implemented in Kotlin multiplatform that targets native desktop platforms.

This uses the net.rubygrapefruit.native.base-cli-app plugin and adds the targets.

net.rubygrapefruit.native.ui-app

Builds a UI application implemented in Kotlin multiplatform that targets native desktop platforms.

Native and JVM libraries

net.rubygrapefruit.kmp.lib

Builds a library implemented in Kotlin multiplatform that targets the JVM, browser and native desktop platforms.

JVM applications and libraries

Supports JVM versions 11-26.

net.rubygrapefruit.jvm.lib

Builds a library implemented using Kotlin/JVM.

net.rubygrapefruit.jvm.cli-app

Builds a command-line application implemented using Kotlin/JVM. Expects that the application uses the JVM module system.

net.rubygrapefruit.jvm.embedded-jvm

Can be applied with net.rubygrapefruit.jvm.cli-app to include a copy of the JVM in the application distribution. The launcher script uses this embedded JVM. Uses jlink to create the JVM image.

net.rubygrapefruit.jvm.native-binary

Can be applied with net.rubygrapefruit.jvm.cli-app to create a native binary to use in the application distribution, instead of using a launcher script. Uses graalvm to create the native binary.

net.rubygrapefruit.jvm.ui-app

Builds a desktop UI application implemented using Kotlin/JVM and that presents a Swing or JavaFX UI. Expects that the application uses the JVM module system.

Gradle plugins

net.rubygrapefruit.gradle-plugin

A convention plugin for implementing Gradle plugins using Kotlin/JVM.

Common application settings for all targets

JVM application settings

JVM library settings

Native application settings

Multi-platform library settings

UI applications

See ../test-apps for some samples.