gradle-convention-plugin

Create and apply Gradle convention plugins for Android multi-module projects.

7|2|Updated Feb 23, 2026
One-click install
npx skills add https://github.com/javiercamarenatriguero/android-skills --skill gradle-convention-plugin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gradle-convention-plugin
Source: https://github.com/javiercamarenatriguero/android-skills/tree/main/gradle-convention-plugin
Command: npx skills add https://github.com/javiercamarenatriguero/android-skills --skill gradle-convention-plugin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining consistent and minimal build configurations across multiple modules in an Android project by centralizing common Gradle settings into reusable convention plugins.

Core Features & Use Cases

  • Centralized Configuration: Define build logic once in build-logic and apply it across modules.
  • Plugin Creation: Guides on writing custom Gradle plugins for Android libraries, applications, Compose, and testing.
  • Version Catalog Integration: Demonstrates how to access and utilize version catalogs within convention plugins.
  • Use Case: When setting up a new Android module, instead of manually adding 50+ lines of configuration for SDK versions, compiler options, and test dependencies, you can apply a pre-defined convention plugin with a single line.

Quick Start

Apply the 'my.android.library' convention plugin to the current module's build.gradle.kts file.

Frequently Asked Questions about gradle-convention-plugin

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

FAQPage Schema
How do I centralize Gradle build logic for an Android multi-module project?

To centralize Gradle build logic for Android multi-module projects, you can create convention plugins in a dedicated build-logic directory. This allows you to define shared configurations, SDK versions, and compiler options once and apply them across modules with a single line.

What are Gradle convention plugins and when should I use them?

Gradle convention plugins are custom plugins that bundle shared build configurations. You should use them when maintaining consistent module setups in large Android projects to avoid duplicating 50+ lines of configuration for SDK versions, compiler options, and test dependencies in every module.

How do I access a version catalog inside a custom Gradle convention plugin?

You can access and utilize version catalogs within custom Gradle convention plugins by referencing them in your build logic. This integration ensures consistent dependency versioning across all Android modules where the convention plugin is applied.

Does this approach work for both Android applications and Compose libraries?

Yes, convention plugins support authoring custom Gradle plugins specifically for Android applications, libraries, Compose, and testing. This ensures consistent build configurations and shared logic across different types of modules in your project.

What is the best way to apply shared test dependencies across multiple Android modules?

The best way to apply shared test dependencies across Android modules is to include them in a convention plugin. By authoring a testing convention plugin, you can enforce consistent test dependency versions and configurations across your entire multi-module project.

Can I reduce boilerplate Gradle configuration when adding a new Android module?

Yes, you can reduce boilerplate when adding a new Android module by applying a pre-defined convention plugin. Instead of manually adding extensive configuration for SDK versions and dependencies, you apply the plugin with a single line in the module's build.gradle.kts file.