Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
new-silvermoon avatar

Android Gradle Logic

  • 604 installs
  • 910 repo stars
  • Updated July 27, 2026
  • new-silvermoon/awesome-android-agent-skills

android-gradle-logic is an agent skill that teaches scalable Android Gradle setup with Convention Plugins and Version Catalogs for developers who need maintainable multi-module build configuration without copy-pasted bui

About

android-gradle-logic is an Android build-system skill from new-silvermoon/awesome-android-agent-skills that guides agents through Gradle Convention Plugins and Version Catalogs following the Now in Android architecture. The skill helps developers stop duplicating Compose, Kotlin, and Hilt setup across modules by centralizing logic in a composite build-logic directory included from settings.gradle.kts. Agents use it when configuring scalable Gradle DSL, build variants, and module configurations without hallucinating incorrect syntax. Developers reach for android-gradle-logic when restructuring multi-module Android apps or adopting convention plugins for the first time. It targets maintainable build.gradle.kts patterns rather than runtime app features.

  • Teaches agents Android Gradle project structure and dependency resolution rules
  • Reduces incorrect build.gradle suggestions by providing authoritative context
  • Includes common patterns for flavors, build types, and multi-module setups
  • Designed specifically for Claude, Cursor and other coding agents working on Android projects
  • 478 developers have installed this skill

Android Gradle Logic by the numbers

  • 604 all-time installs (skills.sh)
  • +23 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #281 of 1,039 Mobile Development skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/new-silvermoon/awesome-android-agent-skills --skill android-gradle-logic

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs604
repo stars910
Last updatedJuly 27, 2026
Repositorynew-silvermoon/awesome-android-agent-skills

How do you centralize Android Gradle build logic?

Get an Android agent that correctly reasons about Gradle dependencies, build variants, and module configurations without hallucinating incorrect DSL.

Who is it for?

Android developers refactoring multi-module apps who want Now in Android-style convention plugins instead of duplicated build.gradle.kts blocks.

Skip if: Developers working on iOS, pure Kotlin JVM backends, or single-module apps with no plans to extract shared build logic.

When should I use this skill?

User asks about Android Gradle convention plugins, version catalogs, build-logic composite builds, or scalable multi-module Gradle configuration.

What you get

Composite build-logic module with convention plugins, version catalog, and reusable Gradle DSL across app modules.

  • build-logic convention plugins
  • libs.versions.toml catalog
  • module build.gradle.kts templates

Files

SKILL.mdMarkdownGitHub ↗

Android Gradle Build Logic & Convention Plugins

This skill helps you configure a scalable, maintainable build system for Android apps using Gradle Convention Plugins and Version Catalogs, following the "Now in Android" (NiA) architecture.

Goal

Stop copy-pasting code between build.gradle.kts files. Centralize build logic (Compose setup, Kotlin options, Hilt, etc.) in reusable plugins.

Project Structure

Ensure your project has a build-logic directory included in settings.gradle.kts as a composite build.

root/
├── build-logic/
│   ├── convention/
│   │   ├── src/main/kotlin/
│   │   │   └── AndroidApplicationConventionPlugin.kt
│   │   └── build.gradle.kts
│   ├── build.gradle.kts
│   └── settings.gradle.kts
├── gradle/
│   └── libs.versions.toml
├── app/
│   └── build.gradle.kts
└── settings.gradle.kts

Step 1: Configure settings.gradle.kts

Include the build-logic as a plugin management source.

// settings.gradle.kts
pluginManagement {
    includeBuild("build-logic")
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}

Step 2: Define Dependencies in libs.versions.toml

Use the Version Catalog for both libraries and plugins.

[versions]
androidGradlePlugin = "8.2.0"
kotlin = "1.9.20"

[libraries]
# ...

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
# Define your own plugins here
nowinandroid-android-application = { id = "nowinandroid.android.application", version = "unspecified" }

Step 3: Create a Convention Plugin

Inside build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt:

import com.android.build.api.dsl.ApplicationExtension
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure

class AndroidApplicationConventionPlugin : Plugin<Project> {
    override fun apply(target: Project) {
        with(target) {
            with(pluginManager) {
                apply("com.android.application")
                apply("org.jetbrains.kotlin.android")
            }

            extensions.configure<ApplicationExtension> {
                defaultConfig.targetSdk = 34
                // Configure common options here
            }
        }
    }
}

Don't forget to register it in build-logic/convention/build.gradle.kts:

gradlePlugin {
    plugins {
        register("androidApplication") {
            id = "nowinandroid.android.application"
            implementationClass = "AndroidApplicationConventionPlugin"
        }
    }
}

Usage

Apply your custom plugin in your modules (e.g., app/build.gradle.kts):

plugins {
    alias(libs.plugins.nowinandroid.android.application)
}

This drastically cleans up module-level build files.

Related skills

How it compares

Use android-gradle-logic for Gradle DSL and convention plugins; use Android feature skills when implementing UI screens or app runtime logic.

FAQ

What Android build pattern does android-gradle-logic follow?

android-gradle-logic follows the Now in Android architecture using a composite build-logic directory, Convention Plugins, and Version Catalogs to centralize shared Gradle configuration across modules.

Does android-gradle-logic replace per-module build.gradle.kts files?

android-gradle-logic keeps per-module build.gradle.kts files but moves repeated Compose, Kotlin, and Hilt setup into reusable convention plugins applied by each module.

Mobile Developmentintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.