android-gradle-logic

Centralizes Android Gradle configuration into reusable convention plugins with composite builds and version catalogs.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/chmonya-inc/dnd-manager --skill android-gradle-logic-chmonya-inc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: android-gradle-logic
Source: https://github.com/chmonya-inc/dnd-manager/tree/main/.agents/skills/android-gradle-logic
Command: npx skills add https://github.com/chmonya-inc/dnd-manager --skill android-gradle-logic-chmonya-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android projects with multiple modules often duplicate the same Gradle configuration (compileSdk, minSdk, Compose setup, toolchains) across every build.gradle.kts file, making updates error-prone and inconsistent. This Skill guides you through centralizing that logic into convention plugins so each module's build file shrinks to a few lines. ## Core Features & Use Cases - Convention Plugin Setup: Step-by-step instructions for creating a build-logic composite build with Application, Library, and Compose convention plugins. - Version Catalog Integration: Shows how to register custom plugin IDs in gradle/libs.versions.toml and share the catalog with build-logic. - AGP 9 Migration Guidance: Explains breaking changes in AGP 9 (built-in Kotlin, removed variant APIs, kapt deprecation) and points to dedicated migration skills. - Use Case: You are adding a new feature module to a multi-module Android app. Instead of copying 40 lines of Gradle config, you apply two convention plugin aliases and declare only the module namespace. ## Quick Start Ask the AI to set up Gradle convention plugins for your multi-module Android project using a build-logic composite build and version catalog.

Frequently Asked Questions about android-gradle-logic

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

FAQPage Schema
How do I create Gradle convention plugins for Android?▼

Create a build-logic directory with a convention module, include it via includeBuild in settings.gradle.kts, and write Plugin<Project> classes that apply com.android.application or com.android.library with shared configuration. Register the plugins in gradlePlugin block and reference them by ID in module build files.

How to share Gradle configuration across multiple Android modules?▼

Use convention plugins in a composite build to define compileSdk, minSdk, and toolchain settings once, then apply them via plugin aliases in each module. This reduces feature module build files to just a few lines declaring plugins and namespace.

Can convention plugins use the version catalog from the root project?▼

Yes, configure build-logic/settings.gradle.kts with a versionCatalogs block that loads the root gradle/libs.versions.toml file. This lets convention plugins resolve dependencies like the Android Gradle Plugin using the same catalog as the main build.

What changes in AGP 9 affect convention plugins?▼

AGP 9 removes the standalone org.jetbrains.kotlin.android plugin, drops BaseExtension and old variant APIs, moves kotlinOptions to a top-level kotlin compilerOptions block, and makes kapt incompatible. Convention plugins touching these areas need migration to androidComponents onVariants and KSP.

When should I use convention plugins instead of shared build scripts?▼

Use convention plugins when multiple modules need identical Android, Kotlin, or Compose configuration, since they provide type-safe, testable, and cacheable build logic. Simple single-module projects do not benefit enough to justify the extra build-logic setup.