gradle-build

gradle-build is a command for Claude Code from mturac/everything-openai-codex. It costs 11 tokens per session (607 once invoked), scanned A, a copy of gradle-build, MIT.

A command that diagnoses and fixes Gradle build and compilation errors in Android and Kotlin Multiplatform projects. Gradle is the build system commonly used to assemble these projects.

In plain words
What is it for?
Use it to repair missing imports, type mismatches, missing dependencies, configuration problems, and other Android or Kotlin Multiplatform build failures.
Why use it?
It organizes configuration and Kotlin errors by module and dependency order, making incremental fixes easier to apply and verify.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mturac/everything-openai-codex/gradle-build
Clone the repo
git clone --depth 1 https://github.com/mturac/everything-openai-codex

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gradle-build

README.md
[![agentmods](https://agentmods.dev/badge/commands/mturac/everything-openai-codex/gradle-build.svg)](https://agentmods.dev/commands/mturac/everything-openai-codex/gradle-build)
Your own site
<a href="https://agentmods.dev/commands/mturac/everything-openai-codex/gradle-build"><img src="https://agentmods.dev/badge/commands/mturac/everything-openai-codex/gradle-build.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 607 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00011 $0.00607
Opus 5 $0.00005 $0.00303
Sonnet 5 $0.00002 $0.00121
Haiku 4.5 $0.00001 $0.00061

Measured 2d ago against content hash c2aa08614831, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

gradle-build scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

95% identical to gradle-build — 7 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

commands/gradle-build.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gradle Build Fix

Incrementally fix Gradle build and compilation errors for Android and Kotlin Multiplatform projects.

Step 1: Detect Build Configuration

Identify the project type and run the appropriate build:

Indicator Build Command
build.gradle.kts + composeApp/ (KMP) ./gradlew composeApp:compileKotlinMetadata 2>&1
build.gradle.kts + app/ (Android) ./gradlew app:compileDebugKotlin 2>&1
settings.gradle.kts with modules ./gradlew assemble 2>&1
Detekt configured ./gradlew detekt 2>&1

Also check gradle.properties and local.properties for configuration.

Step 2: Parse and Group Errors

  1. Run the build command and capture output
  2. Separate Kotlin compilation errors from Gradle configuration errors
  3. Group by module and file path
  4. Sort: configuration errors first, then compilation errors by dependency order

Step 3: Fix Loop

For each error:

  1. Read the file — Full context around the error line
  2. Diagnose — Common categories:
    • Missing import or unresolved reference
    • Type mismatch or incompatible types
    • Missing dependency in build.gradle.kts
    • Expect/actual mismatch (KMP)
    • Compose compiler error
  3. Fix minimally — Smallest change that resolves the error
  4. Re-run build — Verify fix and check for new errors
  5. Continue — Move to next error

Step 4: Guardrails

Stop and ask the user if:

  • Fix introduces more errors than it resolves
  • Same error persists after 3 attempts
  • Error requires adding new dependencies or changing module structure
  • Gradle sync itself fails (configuration-phase error)
  • Error is in generated code (Room, SQLDelight, KSP)

Step 5: Summary

Report:

  • Errors fixed (module, file, description)
  • Errors remaining
  • New errors introduced (should be zero)
  • Suggested next steps

Common Gradle/KMP Fixes

Error Fix
Unresolved reference in commonMain Check if the dependency is in commonMain.dependencies {}
Expect declaration without actual Add actual implementation in each platform source set
Compose compiler version mismatch Align Kotlin and Compose compiler versions in libs.versions.toml
Duplicate class Check for conflicting dependencies with ./gradlew dependencies
KSP error Run ./gradlew kspCommonMainKotlinMetadata to regenerate
Configuration cache issue Check for non-serializable task inputs

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 71 lines · 11 tokens per session scan A c2aa08614831

Subscribe to this mod's changes

gradle-build is a command published in the GitHub repository mturac/everything-openai-codex (89 stars, last pushed 12d ago), licensed MIT. It adds 11 tokens to every session and 607 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to gradle-build, differing in 7 lines, and is treated as a copy.