forax / pro

A Java build tool that works seamlessly with modules
GNU General Public License v3.0
103 stars 15 forks source link

Add "formatter" plugin #57

Closed sormuras closed 6 years ago

sormuras commented 6 years ago

Based on https://github.com/google/google-java-format -- a program that formats Java source code to comply with Google Java Style:

https://google.github.io/styleguide/javaguide.html

Prior to this commit, the "fake-guava" module baked into pro's internal modules prevented classes to be loaded from the "all-deps" JAR. Using java's auto-module feature makes the format program execution possible.

Use the following configuration to actually format all sources:

  set("formatter.rawArguments", list("--replace"))
  run("formatter")