gradle-build-conventions

Apply shared Gradle build conventions across multi-module projects.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/ClankerGuru/opsx --skill gradle-build-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gradle-build-conventions
Source: https://github.com/ClankerGuru/opsx/tree/main/cli/src/main/resources/content/skills/gradle-build-conventions
Command: npx skills add https://github.com/ClankerGuru/opsx --skill gradle-build-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a centralized approach for sharing Gradle build conventions across multi-module projects, reducing duplication and ensuring consistent module, toolchain, publish, and testing configurations.

Core Features & Use Cases

  • Standardized convention plugins live in build-logic/src/main/kotlin/ containing clkx-*.gradle.kts
  • Aggregator clkx-conventions applies all standard conventions for a complete plugin project
  • Covers module, toolchain, plugin, publish, testing, detekt, ktlint, and serialization conventions
  • Settings plugin ClkxSettingsPlugin and Gradle's dependencyResolutionManagement support
  • Encourages string-based dependencies and avoids catalogs in precompiled script plugins

Quick Start

Add the build-logic module to your project and apply the clkx-conventions plugin to enable shared Gradle conventions.

Frequently Asked Questions about gradle-build-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I share Gradle build conventions across multi-module projects?

You can share Gradle build conventions by applying precompiled script plugins located in build-logic/src/main/kotlin. An aggregator plugin orchestrates and enforces module, toolchain, publish, and testing configurations across your modules.

What is the best way to standardize toolchain and publish settings in Gradle?

Standardizing toolchain and publish settings in Gradle is achieved through convention plugins managed by an aggregator. This centralizes configuration, reducing duplication and ensuring consistent project setups.

How does precompiled script plugin management work for Kotlin DSL builds?

Precompiled script plugin management for Kotlin DSL builds works by defining clkx-*.gradle.kts files within build-logic/src/main/kotlin. A settings plugin and dependencyResolutionManagement orchestrate these conventions.

Can I use string-based dependencies instead of catalogs in precompiled script plugins?

Yes, you can use string-based dependencies instead of version catalogs in precompiled script plugins. This approach is explicitly encouraged to simplify dependency declaration within the shared build logic.

What Gradle conventions are covered by a centralized build-logic module?

A centralized build-logic module covers module, toolchain, plugin, publish, testing, detekt, ktlint, and serialization conventions. These are applied together through a clkx-conventions aggregator plugin.

Do I need a settings plugin to apply shared Gradle conventions to my project?

Yes, a settings plugin like ClkxSettingsPlugin is required to support dependencyResolutionManagement and orchestrate the application of shared Gradle conventions across your multi-module project.