Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for Java 17 to site #497

Merged
merged 1 commit into from Aug 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/site/apt/usage.apt.vm
Expand Up @@ -34,6 +34,26 @@ Usage

Some brief examples on how to use this plugin.

* Using Java 17 and later

Java 17 is the first LTS release to enforce strong encapsulation. For
<<<ktlint>>> to work we need to add
<<<--add-opens java.base/java.lang=ALL-UNNAMED>>> to the JVM arguments.

We recommend that you add a <<<.mvn/jvm.config>>> file (relative to the top
level project directory) to all of your projects using this plugin. The file
should have the following contents:

+----------+
--add-opens java.base/java.lang=ALL-UNNAMED
+----------+

We also recommend adding this to all of your projects using this plugin and
building with Java 11, as it'll suppress an illegal-access warning during the
build.

For other options see: {{https://maven.apache.org/configure.html}}

* Formatting and checking for violations as part of the build

Probably the most common use case is to want to both format and check your
Expand Down