chore(renovate): google-java-format.version を Renovate 管理対象にする - #137
Merged
Conversation
Spotless の googleJavaFormat.version は Maven dependency ではないため、標準 Maven manager は com.google.googlejavaformat:google-java-format として認識できない。 property 直前に Renovate annotation を付け、datasource=maven と depName を明示する。バージョン値自体は更新しない。
annotation 付きの *.version property を Maven 依存として抽出するため、customManagers:mavenPropertyVersions を extends に追加する。 preset は annotation がある property だけを対象にするため、他の Maven property を意図せず管理対象へ広げない。
README の Renovate 設定一覧に、customManagers:mavenPropertyVersions と google-java-format.version の対応を追加する。現行構成と README の説明を一致させるため。
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.
背景
google-java-format.versionは Spotless のgoogleJavaFormat.versionとしてだけ参照されている。Renovate の Maven manager は<dependency>/<plugin>の GAV からバージョン property を推論するため、この値をcom.google.googlejavaformat:google-java-formatとして抽出できなかった。spotless-maven-plugin.versionやcheckstyle.versionは plugin / dependency の<version>から参照されているので検出できる。その結果、PR #129 では Spotless 側だけが更新され、google-java-formatの不整合が CI で初めて露呈した。変更内容
pom.xmlのgoogle-java-format.version直前に Renovate annotation を追加し、datasource と depName を明示した。renovate.jsonのextendsにcustomManagers:mavenPropertyVersionsを追加した。この preset は annotation 付きの*.versionproperty だけを対象にする。この PR では
google-java-format.version自体は1.28.0のままにする。Closes #136
確認
Renovate
--platform=local --dry-run=extractで次を確認した。depName: com.google.googlejavaformat:google-java-formatcurrentValue: 1.28.0datasource: maven--dry-run=lookupではnewValue: 1.36.1の更新候補が生成された。その他:
renovate-config-validator: Config validated successfullydocker compose config: 成功mvn clean verify: BUILD SUCCESS(Tests run: 936)docker compose build app/up -d app: 起動成功、Flyway 12 まで適用済み