Local Kroki Plugin
Objectives
local-kroki Gradle plugin aims to:-
run Kroki services locally
-
easily configure services and exposed port
-
work seamlessly with the
local-antoraplugin
About Kroki
Kroki.io makes it really easy to generate diagrams from textual representations, but you might not want to send all your diagrams into the wild.
How It Works
The local-kroki plugin shamelessly rips of the Install Kroki Using Docker Compose docs
and applies the gradle-docker-compose-plugin
to tie everything together.
-
adds the
localAntoraextension -
adds the task
writeKrokiDockerComposeFiletask, writes adocker-compose.ymlfile (to thebuilddirectory) -
applies the gradle-docker-compose-plugin and configures
docker-compose -
adds the tasks
startKrokiandstopKroki
Setup
plugins {
id 'com.gitlab.mvik.local-kroki' version '0.4.0'
}
localKroki {
version '0.11.0'
port 8000
service 'core'
composeFile layout.buildDirectory.file('kroki/docker-compose.yml')
krokiOnly true
}
See More Examples to get the full list of configuration options.
More Examples
See use plugin examples in the source repository.