Commit 518409d
committed
Declare formatter version to avoid spotless choosing a version
diffplug/spotless#2503 (comment)
indicates that spotless chooses a formatter version based on the JDK
running the formatting process. The spotless maintainer recommends that
we declare a formatter version explicitly so that the formatter won't
change based on the JDK version.
Testing done:
In this repository:
mvn clean install versions:display-plugin-updates
In the winstone repository (where we saw the issue):
Reverted the change that made the formatting independent of Java version
in b95111923002d82598d4d85f67f40fa6170dda5e and then added explicit
spotless version definition to the pom file so that I could confirm that
changing Java versions does not change the formatting.
MarkEWaite/winstone@78ea965
has the details
. ~/bin/use_java17
mvn spotless:apply
git status
. ~/bin/use_java21
mvn spotless:apply
git status
Matching pull request in plugin pom:
* jenkinsci/plugin-pom#11511 parent 7c9a368 commit 518409d
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
652 | | - | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
653 | 657 | | |
654 | 658 | | |
655 | 659 | | |
| |||
0 commit comments