android-gradle-logic

Centralize Android Gradle build logic with convention plugins and version catalogs.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/thinhtt264/Snaplet-App --skill android-gradle-logic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-gradle-logic
Source: https://github.com/thinhtt264/Snaplet-App/tree/main/.cursor/skills/android-gradle-logic
Command: npx skills add https://github.com/thinhtt264/Snaplet-App --skill android-gradle-logic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizes Android Gradle build logic to reduce duplication.

Core Features & Use Cases

  • Centralizes build logic into reusable Gradle Convention Plugins and Version Catalogs for multi-module Android projects.
  • Reduces boilerplate in module build.gradle.kts files and promotes consistent defaults across projects.
  • Use Case: In a large Android app with many modules, apply the plugin once and automatically share Compose setup, Kotlin options, and dependency versions.

Quick Start

Include the build-logic module as a composite build and apply the plugin alias in your app module's build.gradle.kts to enable centralized 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 centralize Android Gradle build logic in a multi-module project?

You can centralize Android Gradle build logic by creating a dedicated build-logic module with convention plugins. This architecture allows you to apply shared configurations for Compose, Kotlin options, and dependencies across modules using Gradle Kotlin DSL.

What are Gradle convention plugins and when do I need them?

Gradle convention plugins are custom plugins that bundle shared build configuration. You need them in multi-module Android projects to reduce boilerplate in module build.gradle.kts files and enforce consistent setup across your app.

How do I reduce build.gradle.kts boilerplate using version catalogs?

By combining version catalogs with convention plugins, you can extract dependency versions and shared configurations into a central build-logic module. Applying the plugin alias in your module automatically injects these shared defaults, eliminating repetitive boilerplate.

Can I use convention plugins to share Compose setup across Android modules?

Yes, convention plugins can encapsulate Compose setup within a shared build-logic module. Applying the plugin to your Android modules automatically configures the necessary Compose compiler options and dependencies consistently.

What is the best way to manage dependency versions in large Android apps?

The best way to manage dependency versions in large Android apps is using Gradle version catalogs combined with convention plugins. This centralizes version declarations in a build-logic module, ensuring all modules reference identical dependency versions without duplication.

Do I need Gradle Kotlin DSL to use convention plugins for Android?

Yes, this centralized build logic approach targets Android projects using Gradle Kotlin DSL. You include the build-logic module as a composite build and apply the plugin alias in your module's build.gradle.kts file to enable the configuration.