Master Gradle - Kotlin DSL, task configuration, build optimization, caching
Configures Gradle builds using Kotlin DSL, including custom tasks, dependency catalogs, and build cache optimization. Use when creating or modifying Gradle build files, optimizing build performance, or troubleshooting dependency issues.
/plugin marketplace add pluginagentmarketplace/custom-plugin-java/plugin install pluginagentmarketplace-java-development-assistant@pluginagentmarketplace/custom-plugin-javaThis skill is limited to using the following tools:
assets/build.gradle.ktsassets/config.yamlassets/schema.jsonreferences/GUIDE.mdreferences/PATTERNS.mdscripts/validate.pyMaster Gradle build tool with Kotlin DSL for Java projects.
This skill covers Gradle configuration with Kotlin DSL including task configuration, dependency management with catalogs, build cache optimization, and CI/CD integration.
Use when you need to:
// build.gradle.kts
plugins {
java
id("org.springframework.boot") version "3.2.1"
id("io.spring.dependency-management") version "1.1.4"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}
tasks.withType<JavaCompile> {
options.compilerArgs.addAll(listOf("-parameters", "-Xlint:all"))
options.isFork = true
options.isIncremental = true
}
tasks.test {
useJUnitPlatform()
maxParallelForks = Runtime.getRuntime().availableProcessors() / 2
}
# gradle/libs.versions.toml
[versions]
spring-boot = "3.2.1"
[libraries]
spring-boot-web = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "spring-boot" }
[plugins]
spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot" }
gradle dependencies # View dependencies
gradle dependencyInsight --dependency log4j # Analyze dep
gradle build --scan # Build scan
gradle build --build-cache # Use cache
gradle wrapper --gradle-version 8.5 # Update wrapper
// settings.gradle.kts
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
// Enable parallel and caching
org.gradle.parallel=true
org.gradle.caching=true
| Problem | Solution |
|---|---|
| Slow builds | Enable --build-cache |
| Version conflict | Use platform() or constraints |
| Cache issues | gradle --refresh-dependencies |
Skill("java-gradle")
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.