Gradle convention plugins that simplify bootstrapping Kotlin/Java projects targeting JVM, Multiplatform (Native/JS/Wasm/Wasi), and GraalVM native-image. Focus on writing code — these plugins handle the rest:
- Publishing — Maven Central, GHCR, container images (Jib), artifact signing
- Build & Toolchain — Java/Kotlin toolchain, target platforms (JVM, JS, WASM, WASI, Native), build config generation
- Coverage, Formatting & ABI — Code coverage (JVM & KMP), code formatting, binary compatibility (ABI) validation,
deprecated API scanning (
jdeprscan) - Versioning — SemVer based on Git tags
- Testing & Docs — Testing, reports, JavaDoc, Dokka
- Benchmarking — JMH benchmarking via kotlinx-benchmark
- Processors — KSP & annotation processors, GraalVM native-image, executable JARs
- Version Catalog — Controls artifact versions and build configurations
- Auto-configured Dependencies —
kotlinx-datetime,kotlinx-coroutines,ktor-client,kotlinx-serialization,kotlinx-io, logging - Auto-configured Compiler Plugins —
redacted,kopy,power-assert,atomicfu,dataframe
dev.suresh.plugin.root— Root project configuration and shared settingsdev.suresh.plugin.common— Common conventions for all subprojectsdev.suresh.plugin.kotlin.jvm— Kotlin JVM project setupdev.suresh.plugin.kotlin.mpp— Kotlin Multiplatform project setupdev.suresh.plugin.graalvm— GraalVM native-image supportdev.suresh.plugin.kotlin.docs— Documentation generation (Dokka)dev.suresh.plugin.kotlin.benchmark— JMH benchmarking supportdev.suresh.plugin.publishing— Maven Central publishing and signingdev.suresh.plugin.repos— Repository configuration (settings plugin)dev.suresh.plugin.catalog— Version catalog management
1. Configure settings.gradle.kts
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id.startsWith("dev.suresh.plugin")) {
useVersion("<plugin version>")
}
}
}
repositories {
gradlePluginPortal()
mavenCentral()
}
}
plugins { id("dev.suresh.plugin.repos") }2. Apply plugins in build.gradle.kts
// Kotlin JVM
plugins {
id("dev.suresh.plugin.root")
id("dev.suresh.plugin.kotlin.jvm")
id("dev.suresh.plugin.publishing")
// id("dev.suresh.plugin.graalvm")
application
}
// Kotlin Multiplatform
plugins {
id("dev.suresh.plugin.root")
id("dev.suresh.plugin.kotlin.mpp")
id("dev.suresh.plugin.publishing")
}
kotlin {
jvmTarget(project)
jsTarget(project)
wasmJsTarget(project)
wasmWasiTarget(project)
nativeTargets(project) {}
}3. Set up the version catalog
Copy gradle/libs.versions.toml and update the project-related metadata
(group, app-mainclass, etc.).
Important
Requires Java 25+ (sdk i java 25.0.1-zulu) and the
latest IntelliJ IDEA.
# Build all modules
$ ./gradlew build
# Update dependencies
$ junie --guidelines-filename=.aiassistant/rules/version-updates.md "Update the dependency versions"
# OR
$ ./gradlew dependencyUpdates --no-parallelA separate sandbox project is available for testing with the plugins applied:
# Publish plugins to Maven local
$ ./gradlew publishToMavenLocal
# Build the sandbox app
$ ./gradlew -p sandbox :build
$ sandbox/build/libs/sandbox
# Show task graph
$ ./gradlew build --task-graph
# Run other plugin tasks
$ ./gradlew -p sandbox :dependencyUpdates --no-parallel
# See the plugin classpath
$ ./gradlew -p sandbox :buildEnvironment | grep -i "dev.suresh"Push a new tag to trigger the release workflow and publish
to Maven Central. The next version is based on the semantic
version scope (major, minor, patch).
$ ./gradlew pushSemverTag "-Psemver.scope=patch"
# See the current version
# $ ./gradlew v
# Print the new version
# $ ./gradlew printSemver "-Psemver.scope=patch"
# For a specific version
# $ git tag -am "v1.2.3 release" v1.2.3
# $ git push origin --tagsThe published artifacts are signed using this key. The best way to verify artifacts is automatically with Gradle.
Misc
# Publish to local maven repository
$ rm -rf ~/.m2/repository/dev/suresh
$ ./gradlew publishToMavenLocal
$ tree ~/.m2/repository/dev/suresh
# Publish the plugins to maven central
$ ./gradlew publishToMavenCentral# Update the Gradle Daemon JVM
$ ./gradlew updateDaemonJvm --jvm-version=25 --jvm-vendor=adoptium