Skip to content

Commit

Permalink
Update docs and TODO according to upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Mar 8, 2022
1 parent cfc540d commit 67de601
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,6 @@ You can pass parameters via standard `-D` syntax.

`-Dfmt.skip` is whether the plugin should skip the operation.

### Using with Java 16+ and Maven

Since the JDK is more restrictive since version 16 you need to pass some [parameters](https://github.com/google/google-java-format#jdk-16) to the JVM to run the Google Java Formatter. To do so add the file `.mvn/jvm.config` under your project's root directory with the following contents:

```
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
```

### Using with Java 8

Starting from version 1.8, Google Java Formatter requires Java 11 to run. Incidently, all versions of this plugin starting from 2.10 inclusively also require this Java version to properly function. The 2.9.x release branch is the most up-to-date version that still runs on Java 8.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
<jdk>[17,)</jdk>
</activation>
<properties>
<!-- TODO: Remove this once google-java-fmt supports 17 or the plugin supports forking and run with these args built-in -->
<!-- TODO: Remove this once google-java-fmt supports 17 or the plugin supports forking -->
<argLine> --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</argLine>
</properties>
</profile>
Expand Down

0 comments on commit 67de601

Please sign in to comment.