build: maven 版を kotlin-maven-plugin の親 POM からの導出へ寄せる - #22
Merged
Conversation
k163377
force-pushed
the
ci/auto-version-sync
branch
from
August 8, 2026 02:50
35a0a89 to
f37119a
Compare
k163377
force-pushed
the
ci/auto-version-sync
branch
from
August 8, 2026 03:05
f37119a to
8d16aa5
Compare
maven-core は kotlin-maven-plugin の realm が実行時に供給するため compileOnly で 参照しており、版は kotlin-maven-plugin 自身が provided スコープで宣言する版が正となる。 provided は Gradle の POM 取り込み対象外で推移解決されないため、カタログのリテラルとして 持つ必要があるが、その値を手で選ぶと上流との一致が保証されない。 kotlin-maven-plugin の親 POM の <maven.version> を単一情報源とし、syncMavenVersion が カタログへ書き戻し、checkMavenVersion が乖離を検出する(check へ紐付け)。 親 POM は子 POM の <parent> と照合し、上流のレイアウト変更を黙って取り込まないようにする。 乖離は Kotlin 更新 PR の CI で顕在化し、解消はその PR 上での同期タスクの手動実行に委ねる (版表記や yarn.lock の追随と同じフロー)。 カタログでは導出値を通常の版と段落で分け、手で選ぶ対象でないことをレイアウトでも示す。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
catalog の maven 版は kotlin-maven-plugin の親 POM から導出される値であり、独立して 選べる更新対象ではない。maven-core の他、ハーネスの apache-maven 配布物も同じ値を 共有するため、ignore は org.apache.maven:* で束ねる。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
k163377
force-pushed
the
ci/auto-version-sync
branch
from
August 8, 2026 03:06
8d16aa5 to
e6d17e5
Compare
k163377
marked this pull request as ready for review
August 8, 2026 03:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #21(Dependabot の maven-core 3.9.12 → 3.9.16)への対応。
catalog の maven 版は「kotlin-maven-plugin 自身が参照する版に揃える」不変条件を持つが、
値の追随は手作業に委ねられ、Dependabot は独立した更新対象として扱っていた。
変更
1. maven 版の導出(
build:)kotlin-maven-plugin の親 POM の
<maven.version>を単一情報源とし、syncMavenVersionが catalog へ書き戻す/checkMavenVersion(checkへ紐付け)が乖離を検出する。maven-coreは provided スコープのため Gradle が推移解決せず、catalog はリテラルを持つ必要があるが、その値は手で選ばない。親 POM は子 POM の
<parent>と照合し、上流のレイアウト変更を黙って取り込まない。2. Dependabot の対象から除外(
ci:)org.apache.maven:*を ignore へ。Maven 系の版は Kotlin の更新に伴って追随する導出値であり、独立して選べる更新対象ではない(maven-core の他、ハーネスの apache-maven 配布物も同じ値を共有する)。
乖離時の運用
Kotlin 更新 PR で
checkMavenVersionが失敗したら、その PR 上で./gradlew syncMavenVersion→./gradlew syncVersionMentionsを順に実行してコミットする(catalog は Gradle の構成時に読まれるため起動を分ける)。
版表記・yarn.lock の既存の手動追随と同じフローに収まる。
検証済み
checkMavenVersion正常系 / 乖離検出(3.9.16 へ書き換え)/syncMavenVersionによる復元(catalog が差分ゼロへ戻ることまで確認)checkVersionMentionsgreen・./gradlew ktfmtFormat差分なし(ktfmt 0.27.0 の現行 main 基準)追随
PR #21 は本 PR のマージ後にクローズする(maven 版は導出値になり、独立した更新対象ではなくなるため)。
🤖 Generated with Claude Code