Formats Java code with open-java-format, a maintained fork of palantir-java-format: 120 columns, 4-space indents and lambda-friendly line breaking.
With the plugin enabled, Reformat Code runs open-java-format instead of the IDE's built-in Java formatter, so the IDE and your build produce identical files. The IDE's own Java code style settings no longer apply.
The formatter runs in a process of its own, on the IDE's runtime, so the project SDK can be any version. A project that applies the dev.openjavaformat.java-format Gradle plugin takes the formatter version from the build; every other project uses the version bundled with this plugin.
Requires IntelliJ IDEA 2024.2 or later, or another IDE with Java support such as Android Studio.