スキル一覧に戻る
bitsoex

dependency-management

by bitsoex

Bitso Java API Wrapper

34🍴 30📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: dependency-management description: > Version catalog strategy, dependency management, BOMs, and version constraints for Java/Gradle projects. Covers version centralization, never-downgrade policy, bundle patterns, resolution strategies, and compatibility matrices. compatibility: Java projects using Gradle 8.x or 9.x with version catalogs metadata: version: "1.0.0" technology: java category: build tags: - java - gradle - dependencies - versions - bom

Dependency Management

Standards for managing library versions, dependency constraints, and Bill of Materials (BOM) in Java/Gradle projects.

When to use this skill

  • Adding or updating dependencies
  • Managing library versions in version catalogs
  • Resolving dependency conflicts
  • Upgrading Spring Boot or other frameworks
  • Setting up BOM-based dependency management
  • Understanding version compatibility matrices

Skill Contents

Sections

Available Resources

📚 references/ - Detailed documentation


Critical Policies

1. Version Centralization (Mandatory)

All dependency versions MUST be centralized in gradle/libs.versions.toml.

// ❌ NEVER: Hardcode versions in build.gradle
dependencies {
    implementation "org.springframework.boot:spring-boot-starter-web:3.5.9"
}

// ✅ ALWAYS: Use version catalog
dependencies {
    implementation libs.spring.boot.starter.web
}

See references/version-centralization.md for anti-patterns and approved locations.

2. Never Downgrade Pre-existing Versions

Never replace a library version with an older version that pre-existed in the repository.

AllowedNot Allowed
Upgrade a libraryDowngrade a pre-existing version
Adjust a version YOUR PR introducedPin BOM-managed dependency lower
Add warning commentRemove security patches

See references/version-centralization.md for the full policy.

Version Catalog Structure

The version catalog (gradle/libs.versions.toml) is the single source of truth:

[versions]
spring-boot = "3.5.9"
grpc = "1.78.0"
spock = "2.4-groovy-4.0"
junit-jupiter = "5.14.2"

[libraries]
spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "spring-boot" }
spring-boot-bom = { module = "org.springframework.boot:spring-boot-dependencies", version.ref = "spring-boot" }

[bundles]
testing-spock = ["spock-core", "spock-spring"]
spring-boot-service = ["spring-boot-starter-web", "spring-boot-starter-actuator"]

[plugins]
spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot" }

Key Principles

PrincipleDescription
Single SourceAll versions in one file
BOMs FirstUse BOMs for transitive management
Type-SafeGradle generates type-safe accessors
Semantic GroupsOrganize by framework/purpose

Bundle Patterns

Bundles group related dependencies for cleaner build files:

// ❌ Verbose: Multiple declarations
dependencies {
    testImplementation libs.spock.core
    testImplementation libs.spock.spring
    testImplementation libs.testcontainers.spock
    testImplementation libs.testcontainers.postgresql
}

// ✅ Clean: Use bundles
dependencies {
    testImplementation libs.bundles.testing.spock
    testImplementation libs.bundles.testing.integration
}

Common Bundles

BundleContentsUse Case
testing-spockspock-core, spock-springMost test suites
testing-integrationtestcontainers-spock, postgresIntegration tests
spring-boot-serviceweb, actuatorWeb services
grpc-corenetty-shaded, protobuf, stubgRPC services
codegenlombok, mapstructCode generation

See references/bundle-patterns.md for all bundles and usage.

BOM Strategy

BOMs manage transitive dependency versions automatically:

// In root build.gradle
dependencyManagement {
    imports {
        mavenBom(libs.spring.boot.bom)
        mavenBom(libs.grpc.bom)
    }
}

Benefits

  • Automatic resolution: BOM handles all transitives
  • No conflicts: Related libraries stay compatible
  • Easy updates: Update BOM version once

Platform vs Enforce

// ✅ RECOMMENDED: Use platform() - allows version overrides if needed
implementation platform(libs.spring.boot.bom)

// ⚠️ AVOID: enforcedPlatform() - strictly forces versions
implementation enforcedPlatform(libs.spring.boot.bom)

See references/bom-strategy.md for complete patterns.

References

ReferenceDescription
version-centralization.mdCore principles, anti-patterns, policies
bundle-patterns.mdAll bundle definitions and usage
bom-strategy.mdBill of Materials setup
compatibility-matrices.mdJava/Spring/testing version tables
resolution-strategies.mdConflict resolution, substitutions
security-updates.mdCVE fixes, forced versions
  • .cursor/rules/java-versions-and-dependencies.mdc - Original comprehensive rule
  • .cursor/rules/java-gradle-best-practices.mdc - Gradle configuration patterns
SkillPurpose
gradle-standardsGradle build configuration
dependabot-securityVulnerability management
gradle-9Gradle 9 migration
java-25Java 25 compatibility

スコア

総合スコア

65/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です