Using Gradle
Typeflows provides comprehensive support for Gradle-based projects. Configure build automation, dependency management, and export workflows using either plugin-based automation or library-based integration depending on your project needs.
Usage Modes
Typeflows supports two usage patterns with Gradle:
| Mode | Purpose | When to Use |
|---|---|---|
| Plugin Mode | Create and export configuration files | Building applications with Typeflows-managed configs |
| Library Mode | Create reusable configuration packages | Publishing shared configurations for team use |
Plugin Mode
Use this mode when creating applications that generate configuration files (workflows, dependabot, etc).
Source Structure
The plugin creates a “typeflows” source set with the following structure:
| Language | Source Directory | Test Directory |
|---|---|---|
| Java | src/typeflows/java/ | src/typeflowsTest/java/ |
| Kotlin | src/typeflows/kotlin/ | src/typeflowsTest/kotlin/ |
Setup
Apply the Typeflows plugin and add any dependencies required by your Typeflows Configuration-as-Code, including any published Typeflows libraries:
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
plugins {
id("com.typeflows") version "1.0.0"
}
dependencies {
typeflowsApi("io.typeflows:typeflows-github:1.0.0")
typeflowsApi("io.typeflows:typeflows-github-marketplace:1.0.0")
}
Typeflows SDK Modules
| Module | Description |
|---|---|
io.typeflows:typeflows-bom | Bill of Materials for dependency management |
io.typeflows:typeflows-core | Core Typeflows abstractions and repository types |
io.typeflows:typeflows-github | GitHub workflows, Dependabot, Actions |
io.typeflows:typeflows-github-marketplace | Pre-built GitHub marketplace actions |
io.typeflows:typeflows-llm | Support for LLM agent instructions and control files |
Plugin Tasks
Tasks available when using Plugin Mode:
| Task | Description |
|---|---|
typeflowsExport | Export your Typeflows configuration |
typeflowsInstallClaude | Install LLM instructions about Typeflows into .claude/commands |
typeflowsInstallCopilot | Install LLM instructions about Typeflows into .github/instructions |
typeflowsInstallCursor | Install LLM instructions about Typeflows into .cursor/rules |
typeflowsInstallGenie | Install LLM instructions about Typeflows into .genie/guidelines.md |
Configuring the Typeflows plugin
Available options:
| Property | Type | Default | Description |
|---|---|---|---|
targetDirectory | String | Project root | Export destination directory |
typeflowsClass | String | Typeflows | Fully qualified classname of your repository Builder<TypeflowsRepo> class |
Set these options in the typeflows plugin block:
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
typeflows {
...
}
Library Mode
Use this mode when creating reusable configuration packages for distribution.
Source Structure
Use standard Gradle source structure:
| Language | Source Directory | Test Directory |
|---|---|---|
| Java | src/main/java/ | src/test/java/ |
| Kotlin | src/main/kotlin/ | src/test/kotlin/ |
Setup
Use Typeflows modules as standard dependencies:
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
dependencies {
implementation(platform("io.typeflows:typeflows-bom:1.0.0"))
implementation("io.typeflows:typeflows-github")
implementation("io.typeflows:typeflows-github-marketplace")
implementation("io.typeflows:typeflows-llm")
}
Publishing
Use the standard Gradle maven-publish plugin configuration for publishing to Maven repositories.