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:

ModePurposeWhen to Use
Plugin ModeCreate and export configuration filesBuilding applications with Typeflows-managed configs
Library ModeCreate reusable configuration packagesPublishing 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:

LanguageSource DirectoryTest Directory
Javasrc/typeflows/java/src/typeflowsTest/java/
Kotlinsrc/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!

Typeflows SDK Modules

ModuleDescription
io.typeflows:typeflows-bomBill of Materials for dependency management
io.typeflows:typeflows-coreCore Typeflows abstractions and repository types
io.typeflows:typeflows-githubGitHub workflows, Dependabot, Actions
io.typeflows:typeflows-github-marketplacePre-built GitHub marketplace actions
io.typeflows:typeflows-llmSupport for LLM agent instructions and control files

Plugin Tasks

Tasks available when using Plugin Mode:

TaskDescription
typeflowsExportExport your Typeflows configuration
typeflowsInstallClaudeInstall LLM instructions about Typeflows into .claude/commands
typeflowsInstallCopilotInstall LLM instructions about Typeflows into .github/instructions
typeflowsInstallCursorInstall LLM instructions about Typeflows into .cursor/rules
typeflowsInstallGenieInstall LLM instructions about Typeflows into .genie/guidelines.md

Configuring the Typeflows plugin

Available options:

PropertyTypeDefaultDescription
targetDirectoryStringProject rootExport destination directory
typeflowsClassStringTypeflowsFully 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!

Library Mode

Use this mode when creating reusable configuration packages for distribution.

Source Structure

Use standard Gradle source structure:

LanguageSource DirectoryTest Directory
Javasrc/main/java/src/test/java/
Kotlinsrc/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!

Publishing

Use the standard Gradle maven-publish plugin configuration for publishing to Maven repositories.