Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakzal/gradle-structurizr-cli
Enables Gradle to run Structurizr CLI commands
https://github.com/jakzal/gradle-structurizr-cli
diagrams diagrams-as-code gradle gradle-plugin gradle-plugin-kotlin kotlin structurizr
Last synced: 3 months ago
JSON representation
Enables Gradle to run Structurizr CLI commands
- Host: GitHub
- URL: https://github.com/jakzal/gradle-structurizr-cli
- Owner: jakzal
- License: apache-2.0
- Created: 2020-07-29T19:34:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-01T13:00:26.000Z (4 months ago)
- Last Synced: 2024-10-03T10:58:37.676Z (4 months ago)
- Topics: diagrams, diagrams-as-code, gradle, gradle-plugin, gradle-plugin-kotlin, kotlin, structurizr
- Language: Kotlin
- Homepage:
- Size: 509 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Structurizr CLI Gradle plugin
Enables Gradle to run [Structurizr CLI](https://github.com/structurizr/cli) commands.
## Installation
### Groovy
```groovy
plugins {
id 'pl.zalas.structurizr-cli' version ''
}structurizrCli {
}
```### Kotlin
```kotlin
plugins {
id("pl.zalas.structurizr-cli") version ""
}structurizrCli {
}
```## Tasks
* `structurizrCliDownload` - downloads the Structurizr CLI zip file
* `structurizrCliExtract` - extracts the downloaded Structurizr CLI zip file
* `structurizrCliExport` - exports diagrams with Structurizr CLI
* `structurizrCliPull` - pulls a workspace from the Structurizr API with Structurizr CLI
* `structurizrCliPush` - pushes content to a Structurizr workspace## Configuration & usage
### Version
The latest Structurizr CLI version will be downloaded by default.
The `version` property can be used To force a specific release.```kotlin
structurizrCli {
version = "2024.02.22"
}
```### Export
The export task can be configured to generate a number of diagrams in formats of choice:
```kotlin
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"
}
}
``````bash
./gradlew structurizrCliExport
```### Pull
Pulls a workspace from the Structurizr API with Structurizr CLI.
```bash
./gradlew structurizrCliPull \
--id 48582 \
--key 6804d084-a11e-412b-8ce2-060a40557731 \
--secret 453a265d-099e-491c-89b5-41945395bcfb
```### Push
Pushes content to a Structurizr workspace.
```bash
./gradlew structurizrCliPush \
--id 48582 \
--key 6804d084-a11e-412b-8ce2-060a40557731 \
--secret 453a265d-099e-491c-89b5-41945395bcfb
--workspace workspace.dsl
```### Download
```bash
./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:
```kotlin
structurizrCli {
download {
directory = "downloads"
}
}
```### Extract
```bash
./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:
```kotlin
structurizrCli {
extract {
directory = "structurizr-cli"
}
}
```