Skip to content

Commit cd7090e

Browse files
Merge branch 'main' into update_root
2 parents 387dca2 + 3d799cc commit cd7090e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,23 @@ To have your sources automatically formatted on each build, add to your pom.xml:
3232
</goals>
3333
</execution>
3434
</executions>
35+
<dependencies>
36+
<dependency>
37+
<groupId>com.google.googlejavaformat</groupId>
38+
<artifactId>google-java-format</artifactId>
39+
<version>1.27.0</version>
40+
</dependency>
41+
</dependencies>
3542
</plugin>
3643
</plugins>
3744
</build>
3845
```
3946

47+
The inclusion of the `google-java-format` as a dependency allows you to control that version,
48+
which is generally recommended, so that you can align it with the exact version used in your
49+
IDE, pre-commit Git hook, etc. (If you are fine getting "whatever version `fmt-maven-plugin`
50+
uses" then you could omit it.)
51+
4052
If you prefer, you can only check formatting at build time using the `check` goal:
4153

4254
```xml

0 commit comments

Comments
 (0)