Repository navigation
Immutable
release. Only release title and notes can be modified.
The formatter's output is the same as 21.1.1's, so this release needs no reformatting run. The Gradle plugin now formats Android modules, and the command line tool installs with Homebrew, Scoop, apt and mise.
Gradle plugin
formatDiffand the Spotless step now format the Java files of Android modules: those withcom.android.application,com.android.library,com.android.dynamic-featureorcom.android.test, from Android Gradle plugin 9.1 on. Up to 21.1.1 the plugin did nothing in a module without thejavaplugin: there was noformatDiff, andspotlessCheckpassed whatever the files held. Both cover thejavadirectories of every Android source set, and Java files in thekotlindirectories are left out. The plugin reads the source sets from the build's own Android Gradle plugin and brings none of its own (#284, #288).
Command line
- Homebrew on macOS and Linux, Scoop on Windows and apt on Ubuntu and Debian install the native binary and take each new release within the hour; mise installs it on macOS, Linux and Windows and pins its version per project. The commands are on the Command line page (#151, #152, #153, #260).
- The release carries the Linux binaries as .deb packages too,
open-java-format_21.1.2_amd64.debandopen-java-format_21.1.2_arm64.deb, signed and inchecksums_sha256.txtlike every other file. They install/usr/bin/open-java-formatand need glibc 2.34 or later: Ubuntu 22.04, Debian 12 or newer (#289).
Formatter
- Reading a comment no longer goes through reflection into javac. For every comment of every file the formatter looked up a field that javac has not had since JDK 15, caught the exception, and then copied the comment's text only to take its length (#286, #287).
Thanks
To Liam Miller-Cushon of google-java-format, whose change to reading comments, google-java-format#1546, is ported here.