Skip to content
Back to skills

Build Gradle

ASecurity

Kotlin DSL, dependencies, tasks, plugins, and multi-project builds.

  • 8 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
ai-agentsjavakotlinbashsqlspringapi

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add ngxtm/devkit --skill build-gradle --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Build Gradle?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Build Gradle
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ngxtm-build-gradle/badge)](https://www.skillsdirectory.com/skills/ngxtm-build-gradle)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Gradle Build
description: Kotlin DSL, dependencies, tasks, plugins, and multi-project builds.
metadata:
  labels: [java, gradle, build]
  triggers:
    files: ['build.gradle', 'build.gradle.kts', 'settings.gradle', 'settings.gradle.kts']
    keywords: [dependencies, plugins, tasks, implementation, testImplementation, kotlin]
---

# Gradle Build Standards

## Kotlin DSL Structure

```kotlin
// build.gradle.kts
plugins {
    java
    id("org.springframework.boot") version "3.2.0"
    id("io.spring.dependency-management") version "1.1.4"
}

group = "com.example"
version = "1.0.0-SNAPSHOT"

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(21)
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation("org.springframework.boot:spring-boot-starter-web")
    implementation("org.springframework.boot:spring-boot-starter-data-jpa")
    runtimeOnly("org.postgresql:postgresql")

    testImplementation("org.springframework.boot:spring-boot-starter-test")
    testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

tasks.test {
    useJUnitPlatform()
}
```

## Dependency Configurations

```kotlin
dependencies {
    implementation("...")       // Compile + runtime, not exposed
    api("...")                  // Compile + runtime, exposed to consumers
    compileOnly("...")          // Compile only (like Lombok)
    runtimeOnly("...")          // Runtime only (JDBC drivers)
    testImplementation("...")   // Test compile + runtime
    annotationProcessor("...")  // Annotation processing
}
```

## Custom Tasks

```kotlin
tasks.register("hello") {
    group = "custom"
    description = "Prints hello"
    doLast {
        println("Hello, Gradle!")
    }
}

tasks.register<Copy>("copyResources") {
    from("src/main/resources")
    into("build/resources")
}
```

## Common Commands

```bash
./gradlew build          # Build project
./gradlew test           # Run tests
./gradlew bootRun        # Run Spring Boot
./gradlew dependencies   # Show dependencies
./gradlew tasks          # List tasks
```

## References

- [Kotlin DSL](references/kotlin-dsl.md) - Migration from Groovy, type-safe configuration

Files in this skill

  • SKILL.md2.1 KB
  • references/REFERENCE.md450 B
  • references/kotlin-dsl.md2.4 KB
  • references/task-configuration.md2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…