gradle-conventions-kmp

Configure Gradle module structure and version catalogs for Kotlin Multiplatform projects.

Updated Sep 12, 2026
One-click install
npx skills add https://github.com/Vierco/citoVisionApp --skill gradle-conventions-kmp-vierco
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gradle-conventions-kmp
Source: https://github.com/Vierco/citoVisionApp/tree/main/.claude/skills/gradle-conventions-kmp
Command: npx skills add https://github.com/Vierco/citoVisionApp --skill gradle-conventions-kmp-vierco

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Kotlin Multiplatform projects often end up with inconsistent Gradle setups: hardcoded dependency versions scattered across modules, Android entry points living inside the shared module (which breaks with AGP 9.0), and premature or missing convention plugins. This Skill defines clear conventions for module organization, a single version catalog, and when to introduce build-logic. ## Core Features & Use Cases - Module Structure Enforcement: Ensures each platform with an installable app (androidApp, desktopApp, iosApp) has its own entry point module, while shared stays a pure KMP library module. - Version Catalog Centralization: Mandates a single gradle/libs.versions.toml as the only source of versions, with kebab-case naming and BOM usage where available (e.g., Koin BOM). - Convention Plugin Guidance: Provides decision rules for when to introduce build-logic convention plugins—only when real duplication exists across two or more modules. - Use Case: When migrating a project to AGP 9.0, use this Skill to audit that MainActivity lives in androidApp rather than shared, and that no module declares hardcoded dependency versions outside the catalog. ## Quick Start Audit my Kotlin Multiplatform project's Gradle setup and move any hardcoded dependency versions into libs.versions.toml while separating the Android entry point into its own androidApp module.

Frequently Asked Questions about gradle-conventions-kmp

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

FAQPage Schema
How do I structure modules in a Kotlin Multiplatform project?▼

Create a shared KMP library module containing only shared logic and UI, plus separate entry point modules per platform: androidApp for Android, desktopApp for Desktop, and an Xcode project for iOS. Each app module consumes shared as a dependency; shared never applies application plugins.

How do I centralize dependency versions in Gradle with a version catalog?▼

Declare all versions, libraries, and plugins in a single gradle/libs.versions.toml file using kebab-case entry names. Reference them in build scripts as libs.koin.core, and use BOMs like koin-bom to align related artifact versions instead of pinning each one separately.

Why does my KMP project break after upgrading to AGP 9.0?▼

AGP 9.0 no longer allows applying com.android.application inside a multiplatform module. Move MainActivity and the Application class into a separate androidApp module applying com.android.application, and keep shared on com.android.library with kotlin multiplatform.

When should I create convention plugins with build-logic in Gradle?▼

Introduce build-logic convention plugins only when at least two modules share duplicated Gradle configuration, such as repeated Compose Multiplatform setup blocks. Creating build-logic preemptively in a single-shared-module project adds complexity without benefit.

Can the shared KMP module contain the Android MainActivity?▼

No. The shared module must never contain platform application entry points or apply com.android.application. The Android entry point belongs in a dedicated androidApp module that depends on shared, which is mandatory from AGP 9.0 onward.