kotlin-tools

Gradle Plugins

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

These plugins all target Kotlin 2.3.10 and Java 17 (for Kotlin/JVM libraries and Gradle plugins) or Java 21 (for Kotlin/JVM apps). 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 desktop applications and libraries

net.rubygrapefruit.native.desktop-lib

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

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.

net.rubygrapefruit.native.base-cli-app

Builds a command-line application implemented in Kotlin multiplatform. Does not define any targets, these have to be explicitly defined.

Native and JVM libraries

net.rubygrapefruit.kmp.lib

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

This uses the net.rubygrapefruit.kmp.base-lib plugin and adds the targets.

net.rubygrapefruit.kmp.base-lib

Builds a library implemented in Kotlin multiplatform. Does not define any targets, these have to be explicitly defined.

JVM applications and libraries

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

See ../test-apps for some samples.