android-gradle-logic

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

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/w0lzard/Wolzard-s-Marketplace --skill android-gradle-logic-w0lzard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-gradle-logic
Source: https://github.com/w0lzard/Wolzard-s-Marketplace/tree/main/plugins/personal-skills/skills/android-gradle-logic
Command: npx skills add https://github.com/w0lzard/Wolzard-s-Marketplace --skill android-gradle-logic-w0lzard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android projects with many modules often duplicate the same Gradle configuration (compileSdk, minSdk, toolchains, Compose setup) across every build.gradle.kts file, making updates error-prone and inconsistent. This Skill guides you through centralizing that logic into convention plugins inside a build-logic composite build. ## Core Features & Use Cases - Convention Plugin Setup: Step-by-step creation of application, library, and Compose convention plugins registered with stable IDs. - Composite Build & Version Catalog Wiring: Configures build-logic as an included build and shares the root libs.versions.toml catalog with it. - AGP 9 Migration Guidance: Flags breaking changes (built-in Kotlin, removed variant APIs, kapt removal) and defers to dedicated migration skills. - Use Case: You are modularizing an Android app into feature modules. Apply this Skill so each feature module's build file shrinks to a few lines while all shared configuration lives in one place. ## Quick Start Set up a build-logic composite build with convention plugins so my Android feature modules share one central Gradle configuration.

Frequently Asked Questions about android-gradle-logic

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

FAQPage Schema
How do I share Gradle configuration across Android modules?

Create a build-logic directory included as a composite build via includeBuild in settings.gradle.kts, then write convention plugins that apply common configuration. Modules apply them with a single plugins block alias instead of repeating configuration.

How to create a Gradle convention plugin in Kotlin DSL?

Apply the kotlin-dsl plugin in build-logic/convention/build.gradle.kts, write a class implementing Plugin<Project>, and register it in the gradlePlugin block with a stable ID. Declare the ID in libs.versions.toml so modules can reference it with alias(libs.plugins...).

Can build-logic use the root version catalog?

Yes, but not automatically. In build-logic/settings.gradle.kts, create a version catalog in dependencyResolutionManagement that points to the root gradle/libs.versions.toml file using from(files(...)).

Does this convention plugin setup work with AGP 9?

The examples target AGP 8. AGP 9 removes the standalone org.jetbrains.kotlin.android plugin, drops BaseExtension and old variant APIs, moves kotlinOptions to kotlin { compilerOptions {} }, and breaks kapt, so convention plugins touching these need migration.

When should I use convention plugins instead of copy-pasting build scripts?

Use convention plugins once you have multiple modules sharing compileSdk, minSdk, toolchains, or Compose setup. They define configuration once, so updates propagate to every module without editing each build file.