gradle-dependency-management
Manages Gradle dependencies using version catalogs, BOMs, and dependency constraints. Use when setting up dependency management, centralizing versions, resolving conflicts, or configuring multi-module dependency sharing. Triggers on "setup version catalog", "centralize dependencies", "resolve version conflict", or "configure Gradle BOM". Works with gradle/libs.versions.toml and includes Bill of Materials, dependency constraints, and Spring Boot/GCP BOM integration.
What this skill does
# Gradle Dependency Management
## Table of Contents
- [Purpose](#purpose)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Instructions](#instructions)
- [Examples](#examples)
- [Requirements](#requirements)
- [Commands](#commands)
- [See Also](#see-also)
## Purpose
Centralize and manage dependencies effectively across Gradle projects using version catalogs, BOMs, and dependency constraints. This skill helps you standardize versions, resolve conflicts, and maintain security across multi-module builds.
## When to Use
Use this skill when you need to:
- Centralize dependency versions across multi-module projects
- Create type-safe dependency references with version catalogs
- Resolve dependency version conflicts
- Enforce consistent dependency versions across a team
- Integrate Spring Boot or GCP BOMs for curated dependency sets
- Lock dependency versions for reproducible builds
- Manage transitive dependencies with constraints
## Quick Start
Create a version catalog in `gradle/libs.versions.toml`:
```toml
[versions]
spring-boot = "3.5.5"
junit = "5.11.0"
[libraries]
spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
[bundles]
spring-boot-web = ["spring-boot-starter-web"]
testing = ["junit-jupiter"]
[plugins]
spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot" }
```
Configure in `settings.gradle.kts`:
```kotlin
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("gradle/libs.versions.toml"))
}
}
}
```
Use in `build.gradle.kts`:
```kotlin
plugins {
alias(libs.plugins.spring.boot)
}
dependencies {
implementation(libs.spring.boot.starter.web)
testImplementation(libs.bundles.testing)
}
```
## Instructions
### Step 1: Set Up Version Catalog
Create `gradle/libs.versions.toml` with your project's dependencies:
```toml
[versions]
spring-boot = "3.5.5"
spring-cloud = "2024.0.1"
spring-cloud-gcp = "6.1.1"
mapstruct = "1.6.3"
testcontainers = "1.21.0"
junit = "5.11.0"
mockito = "5.14.0"
[libraries]
# Spring Boot
spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web" }
spring-boot-starter-actuator = { module = "org.springframework.boot:spring-boot-starter-actuator" }
spring-boot-starter-data-jpa = { module = "org.springframework.boot:spring-boot-starter-data-jpa" }
spring-boot-starter-test = { module = "org.springframework.boot:spring-boot-starter-test" }
# GCP
spring-cloud-gcp-starter = { module = "com.google.cloud:spring-cloud-gcp-starter" }
spring-cloud-gcp-pubsub = { module = "com.google.cloud:spring-cloud-gcp-starter-pubsub" }
google-cloud-secretmanager = { module = "com.google.cloud:google-cloud-secretmanager", version = "2.2.0" }
# Database
postgresql = { module = "org.postgresql:postgresql" }
flyway-core = { module = "org.flywaydb:flyway-core" }
# MapStruct
mapstruct = { module = "org.mapstruct:mapstruct", version.ref = "mapstruct" }
mapstruct-processor = { module = "org.mapstruct:mapstruct-processor", version.ref = "mapstruct" }
# Testing
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
testcontainers-junit = { module = "org.testcontainers:junit-jupiter", version.ref = "testcontainers" }
testcontainers-postgresql = { module = "org.testcontainers:postgresql", version.ref = "testcontainers" }
[bundles]
spring-boot-web = ["spring-boot-starter-web", "spring-boot-starter-actuator"]
spring-data = ["spring-boot-starter-data-jpa", "postgresql", "flyway-core"]
gcp = ["spring-cloud-gcp-starter", "spring-cloud-gcp-pubsub", "google-cloud-secretmanager"]
testing = ["junit-jupiter", "mockito-core", "spring-boot-starter-test"]
testcontainers = ["testcontainers-junit", "testcontainers-postgresql"]
[plugins]
spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot" }
spring-dependency-management = { id = "io.spring.dependency-management", version = "1.1.7" }
jib = { id = "com.google.cloud.tools.jib", version = "3.4.4" }
```
### Step 2: Configure in Settings File
Update `settings.gradle.kts` to use the version catalog:
```kotlin
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("gradle/libs.versions.toml"))
}
}
}
// For multi-module projects
rootProject.name = "supplier-charges"
include("shared-domain")
include("supplier-charges-hub")
```
### Step 3: Use in Build Scripts
In `build.gradle.kts`, use type-safe dependency references:
```kotlin
plugins {
alias(libs.plugins.spring.boot)
alias(libs.plugins.spring.dependency.management)
}
dependencies {
// Single dependencies
implementation(libs.spring.boot.starter.web)
implementation(libs.mapstruct)
annotationProcessor(libs.mapstruct.processor)
// Bundles (groups of related dependencies)
implementation(libs.bundles.spring.boot.web)
implementation(libs.bundles.gcp)
testImplementation(libs.bundles.testing)
testImplementation(libs.bundles.testcontainers)
}
```
### Step 4: Manage BOMs for Curated Versions
Use Bill of Materials to control transitive dependencies:
```kotlin
// build.gradle.kts
dependencyManagement {
imports {
mavenBom("com.google.cloud:spring-cloud-gcp-dependencies:6.1.1")
mavenBom("org.springframework.cloud:spring-cloud-dependencies:2024.0.1")
}
}
dependencies {
// No version needed - comes from BOM
implementation("com.google.cloud:spring-cloud-gcp-starter")
implementation("org.springframework.cloud:spring-cloud-config-client")
}
```
### Step 5: Resolve Conflicts with Constraints
Use dependency constraints to force specific versions without declaring the dependency:
```kotlin
dependencies {
// Actual dependencies
implementation("org.springframework.boot:spring-boot-starter-web")
// Constraints - enforce versions of transitive dependencies
constraints {
implementation("org.bouncycastle:bcprov-jdk15on:1.70")
implementation("ch.qos.logback:logback-core:1.5.19")
}
}
```
To exclude a problematic transitive dependency:
```kotlin
dependencies {
implementation("com.example:library:1.0") {
exclude(group = "commons-logging", module = "commons-logging")
}
}
```
## Examples
### Example 1: Multi-Module with Shared Catalog
```toml
# gradle/libs.versions.toml
[versions]
spring-boot = "3.5.5"
[libraries]
spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web" }
spring-boot-starter-test = { module = "org.springframework.boot:spring-boot-starter-test" }
[plugins]
spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot" }
```
```kotlin
// Root settings.gradle.kts
rootProject.name = "supplier-charges"
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("gradle/libs.versions.toml"))
}
}
}
include("shared-domain")
include("supplier-charges-hub")
include("supplier-charges-worker")
```
```kotlin
// shared-domain/build.gradle.kts
plugins {
id("java-library")
}
dependencies {
api(libs.spring.boot.starter.web)
}
```
```kotlin
// supplier-charges-hub/build.gradle.kts
plugins {
alias(libs.plugins.spring.boot)
}
dependencies {
implementation(project(":shared-domain"))
testImplementation(libs.spring.boot.starter.test)
}
```
### Example 2: Resolving Dependency Conflicts
```kotlin
// When Spring Boot and external library have conflicting versions
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("com.external:library:1.0") // Uses old commons-lang3
// Force the newer version
constraints {
implementation("org.apache.commons:commons-lang3:3.18.0")
}
}
// Or use resolutionStrategy
configurRelated in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.