If you use the version 0.10.0 or greater with Java21, sbt 1.10 or greater this error is thrown:
[error] (Compile / javafmt) java.lang.IllegalAccessError: class com.google.googlejavaformat.java.ImportOrderer (in unnamed module @0x261f3c95) cannot access class com.sun.tools.javac.parser.Tokens$TokenKind (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.parser to unnamed module @0x261f3c95
version 0.9.0 is ok
If you use the version 0.10.0 or greater with Java21, sbt 1.10 or greater this error is thrown:
version 0.9.0 is ok