Enables Gradle to run Structurizr CLI commands.
plugins {
id 'pl.zalas.structurizr-cli' version '<version>'
}
structurizrCli {
}
plugins {
id("pl.zalas.structurizr-cli") version "<version>"
}
structurizrCli {
}
structurizrCliDownload
- downloads the Structurizr CLI zip filestructurizrCliExtract
- extracts the downloaded Structurizr CLI zip filestructurizrCliExport
- exports diagrams with Structurizr CLIstructurizrCliPull
- pulls a workspace from the Structurizr API with Structurizr CLIstructurizrCliPush
- pushes content to a Structurizr workspace
The latest Structurizr CLI version will be downloaded by default.
The version
property can be used To force a specific release.
structurizrCli {
version = "2024.02.22"
}
The export task can be configured to generate a number of diagrams in formats of choice:
structurizrCli {
export {
format = "plantuml"
workspace = "docs/diagrams/workspace.dsl"
}
export {
format = "json"
workspace = "docs/diagrams/workspace.dsl"
}
export {
format = "plantuml"
workspace = "docs/diagrams/workspace2.dsl"
output = "output"
name = "SomeCustomName"
}
}
./gradlew structurizrCliExport
Pulls a workspace from the Structurizr API with Structurizr CLI.
./gradlew structurizrCliPull \
--id 48582 \
--key 6804d084-a11e-412b-8ce2-060a40557731 \
--secret 453a265d-099e-491c-89b5-41945395bcfb
Pushes content to a Structurizr workspace.
./gradlew structurizrCliPush \
--id 48582 \
--key 6804d084-a11e-412b-8ce2-060a40557731 \
--secret 453a265d-099e-491c-89b5-41945395bcfb
--workspace workspace.dsl
./gradlew structurizrCliDownload
By default, the structurizr-cli zip is downloaded to the build/downloads
directory.
It can be customised in relation to the project directory:
structurizrCli {
download {
directory = "downloads"
}
}
./gradlew structurizrCliExtract
By default, the structurizr-cli zip is extracted to the build/structurizr-cli
directory.
It can be customised in relation to the project directory:
structurizrCli {
extract {
directory = "structurizr-cli"
}
}