You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**⚠️ Note on using Google Java Format with Java 16+**
191
+
192
+
Using Java 16+ with Google Java Format 1.10.0 [requires additional flags](https://github.com/google/google-java-format/releases/tag/v1.10.0) to the running JDK.
193
+
These Flags can be provided using the `gradle.properties` file (See [documentation](https://docs.gradle.org/current/userguide/build_environment.html)).
194
+
195
+
For example the following file under `gradle.properties` will run maven with the required flags:
This is a workaround to a [pending issue](https://github.com/diffplug/spotless/issues/834).
204
+
190
205
### eclipse jdt
191
206
192
207
[homepage](https://www.eclipse.org/downloads/packages/). [compatible versions](https://github.com/diffplug/spotless/tree/main/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter). See [here](../ECLIPSE_SCREENSHOTS.md) for screenshots that demonstrate how to get and install the config file mentioned below.
Copy file name to clipboardExpand all lines: plugin-maven/README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -212,6 +212,17 @@ any other maven phase (i.e. compile) then it can be configured as below;
212
212
</googleJavaFormat>
213
213
```
214
214
215
+
**⚠️ Note on using Google Java Format with Java 16+**
216
+
217
+
Using Java 16+ with Google Java Format 1.10.0 [requires additional flags](https://github.com/google/google-java-format/releases/tag/v1.10.0) to the running JDK.
218
+
These Flags can be provided using `MAVEN_OPTS` environment variable or using the `./mvn/jvm.config` file (See [documentation](https://maven.apache.org/configure.html#mvn-jvm-config-file)).
219
+
220
+
For example the following file under `.mvn/jvm.config` will run maven with the required flags:
This is a workaround to a [pending issue](https://github.com/diffplug/spotless/issues/834).
225
+
215
226
### eclipse jdt
216
227
217
228
[homepage](https://www.eclipse.org/downloads/packages/). [compatible versions](https://github.com/diffplug/spotless/tree/main/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter). [code](https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/Eclipse.java). See [here](../ECLIPSE_SCREENSHOTS.md) for screenshots that demonstrate how to get and install the config file mentioned below.
0 commit comments