Files
DongHyeonka 414666cfc7 build: 템플릿 밖에서 혼자 빌드·배포되는 Gradle 루트를 만든다
옮겨 온 gRPC 모듈은 템플릿의 두 번째 빌드(optional build)였다. 그 빌드는
템플릿 build-logic·카탈로그·registry·config를 상대 경로로 읽었고,
grpc-operation-ledger-jpa는 템플릿 persistence-jpa의 testFixtures 파일
셋을 빌드 때 복사해 왔다. 별도 repo에는 그 경로가 없다.

repo 루트를 Gradle 루트로 둔다.
- build-logic: 템플릿 22df3525의 src/build-logic을 복사하고 쓰지 않는
  플러그인(bootrun-dotenv, redis topology, config contract,
  spring-library, optional registry, purity 태스크)을 뺐다. 출처와 고친
  곳은 build-logic/UPSTREAM.md에 적었다(설계 10.3절 L1).
- registry config/architecture/modules.json: 템플릿의 optional-grpc 9행,
  source_path는 Gradle 루트 기준.
- 카탈로그·config: 이 repo가 쓰는 항목만. SpotBugs 제외는 이 repo
  클래스와 일반 규칙만 남겼다.
- group은 gradle.properties의 libraryGroup(com.hyeonworks.grpc)에서
  읽는다. 버전은 -PreleaseVersion 말고 RELEASE_TAG(vX.Y.Z)에서도 읽고,
  다른 모양의 태그는 빌드 전에 거부한다.
- 배포: 새 ca.library-publishing이 모듈마다 Maven publication(sources·
  javadoc jar, versionMapping으로 해석된 버전)과 저장소 gitea·staging,
  SIGNING_KEY가 있으면 PGP 서명을 단다. 루트는 SBOM artifact
  grpc-library와 단계 태스크 ci·mainCheck·releaseCheck·release·
  releaseRehearsal을 가진다. Trivy·Buf는 scripts/tool.sh가 SHA-256으로
  고정해 받는다.
- testFixtures 결합(설계 4.6절 2번)은 integrationTest 안 사본으로 끊었다.
- Buf lint·breaking은 Gradle 태스크(scripts/buf.sh)로 ci에 넣었다.

버린 대안: build-logic을 템플릿이 배포(L2, 순환), 공통 repo(L3, repo가
하나 더), 표준 플러그인만으로 새로 쓰기(L4, strict lane과 방향 검사를
잃음). SBOM은 CycloneDX Gradle 플러그인 대신 이미 고정해 쓰는 Trivy로
만든다(도구를 늘리지 않는다).

위험: strictlane 단계 검사는 included build 태스크를 따라가다 실패해서
그 태스크를 건너뛰게 고쳤다(UPSTREAM.md). Gitea에 실제로 올리는 경로는
비밀 값이 없어 이 커밋에서는 시험하지 못했다.

검증(desktop, 이 트리): ./gradlew ci rc=0, 테스트 739개(build-logic
포함) 중 첫 실행 실패 1개(템플릿 경로를 찾던 GrpcPackageOwnershipTest)를
고친 뒤 통과. ./gradlew verifyStrictLaneStages --dry-run rc=0.

Refs: design-docs repo-structure/05-library-repos.md 4.6·7·10절
2026-11-08 11:10:21 +09:00

76 lines
4.3 KiB
TOML

# Version catalog — every dependency and tool version this build pins itself.
#
# Copied from the backend template's src/gradle/libs.versions.toml (see build-logic/UPSTREAM.md for
# the commit) and cut to the entries this library uses. Versions managed by an imported BOM (Spring
# Boot, io.grpc) are not here; `grpc` below is the version of the BOM itself. `gradle.lockfile`
# fixes what resolves; this file makes the chosen versions visible side by side.
#
# The `pinned-*` libraries: no module declares them, and their upstream still brings a version with
# a High or Critical advisory. build-logic's JavaConventionsPlugin pins every `pinned-*` entry
# through Spring dependency management in every configuration (the Checkstyle and Error Prone
# classpaths included). Delete an entry once every upstream named in its comment brings a fixed
# version itself.
[versions]
assertj = "3.27.7"
# Checkstyle *tool* version (the `checkstyle` extension), not a plugin: Checkstyle is a Gradle
# built-in plugin with no coordinate of its own.
checkstyle = "13.5.0"
errorprone = "2.49.0"
# The Gradle plugin that runs the checker above. Two different artifacts, two different version
# lines, deliberately adjacent so a bump of one is visibly not a bump of the other.
errorpronePlugin = "5.1.0"
findsecbugs = "1.14.0"
# Spotless's google-java-format step. A formatter version is a repository-wide decision: a bump
# reformats every file.
googleJavaFormat = "1.35.0"
# Pinned (see `pinned-*` below). CVE-2026-102554, fixed in 33.7.2. Brought by gRPC (33.2.1), Error
# Prone (33.5.0) and the Checkstyle tool (33.6.0).
guava = "33.7.2-jre"
# io.grpc BOM. ca.grpc-platform-module imports it in the modules that apply that convention.
grpc = "1.75.0"
# Only build-logic resolves jackson3 as written (it reads the module registry); in the modules the
# Spring Boot BOM's jackson-bom decides. Keep it at the BOM's number.
jackson3 = "3.1.7"
junitJupiter = "5.11.3"
junitPlatform = "1.11.3"
# Pinned (see `pinned-*` below). CVE-2025-67030, fixed in 3.6.1 on the 3.x line. Brought by the
# Checkstyle tool's doxia (3.3.0).
plexusUtils = "3.6.1"
# protobuf-java for grpc:grpc-contract's generated messages. Keep it at the protobuf-java that
# grpc-protobuf of the gRPC BOM above declares, so the schema runs on the runtime gRPC was built
# against.
protobufGrpc = "3.25.8"
# The Gradle plugin that runs protoc for grpc:grpc-contract. protoc and the protobuf-java runtime
# the generated code links against are both `protobufGrpc` above, so generator and runtime move
# together with the gRPC BOM.
protobufPlugin = "0.10.0"
# SpotBugs *tool* version (the `spotbugs` extension). The plugin that runs it is spotbugsPlugin.
spotbugs = "4.10.2"
spotbugsPlugin = "6.5.6"
spotless = "8.6.0"
springBoot = "4.0.9"
# The version that actually resolves. Spring Boot 4.0.9's own plugin brings
# dependency-management 1.1.7, so the 1.1.6 that used to be written here was a floor nothing ever
# selected (`./gradlew buildEnvironment` reported `1.1.6 -> 1.1.7`). build-logic applies the plugin
# too and has no Boot plugin to upgrade it, so a catalog stating a version nobody resolves would
# have given the convention plugins a different one from the leaves.
springDependencyManagement = "1.1.7"
[libraries]
assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj" }
errorprone-core = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" }
findsecbugs-plugin = { module = "com.h3xstream.findsecbugs:findsecbugs-plugin", version.ref = "findsecbugs" }
jackson3-core = { module = "tools.jackson.core:jackson-core", version.ref = "jackson3" }
jackson3-databind = { module = "tools.jackson.core:jackson-databind", version.ref = "jackson3" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junitJupiter" }
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junitPlatform" }
protobuf-java-grpc = { module = "com.google.protobuf:protobuf-java", version.ref = "protobufGrpc" }
protoc = { module = "com.google.protobuf:protoc", version.ref = "protobufGrpc" }
pinned-guava = { module = "com.google.guava:guava", version.ref = "guava" }
pinned-plexus-utils = { module = "org.codehaus.plexus:plexus-utils", version.ref = "plexusUtils" }
[plugins]
protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" }