Skip to content


Repository files navigation

Build Status Gradle Status


Gradle plugins that help manage Knot.x modules builds.


Distribution Plugin

Distribution Plugin identifies good practices on how to create a custom Knot.x distribution. This is a set of tasks that you can use when starting a new project, regardless of whereter it is Docker-based or not.

How to use

Declare the plugins section in your build script

plugins {

Then point to the root directory with the Knot.x configuration, setting the knotx.conf property in E.g:


Now you can configure clean and build tasks with Knot.x Distribution Plugin tasks (see their descriptions below):

tasks.named("build") { finalizedBy("assembleCustomDistribution") }
tasks.named("clean") { dependsOn("cleanDistribution") }

All your custom modules can be easily configured with the dist configuration, e.g:

dependencies {
    subprojects.forEach { "dist"(project(":${}")) }

Available tasks

  • overwriteCustomFiles - copies/replaces files from the directory specified in the knotx.conf property to build/out/knotx. In addition, all dependencies form dist are copied to build/out/lib.
  • downloadBaseDistribution - downloads the Knot.x Stack and extracts it into the build/out directory
  • assembleCustomDistribution - combines the two above tasks and creates a full Knot.x distribution with all your custom dependencies. Distribution available in the build/distribution directory


ZIPed distribution

Check the Getting Started with Knot.x Stack example project as a reference.

Docker distribution

Check Knot.x Starter Kit as a reference.

Local development and testing

In order to properly develop and test new version of this plugin, you will need a working project on which tests will be carried out.

When you have it prepared, add the following snippet at the beginning of the target project's settings.gradle.kts file:

pluginManagement {
    repositories {

After that, you can push the new version of knotx-gradle-plugins to your local Maven repository (via Gradle's publishToMavenLocal task), and verify that the added functionality works as expected.


Run ./gradlew clean build to build the project.