Created
December 23, 2022 13:14
-
-
Save michael-simons/4966ad1be971453a2ae726fe19126d69 to your computer and use it in GitHub Desktop.
Formats Java source files with Google Formats.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//usr/bin/env jbang "$0" "$@" ; exit $? | |
//JAVA 17+ | |
//DEPS com.google.googlejavaformat:google-java-format:1.15.0 | |
//RUNTIME_OPTIONS --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED | |
//RUNTIME_OPTIONS --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED | |
//RUNTIME_OPTIONS --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED | |
//RUNTIME_OPTIONS --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED | |
//RUNTIME_OPTIONS --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED | |
import com.google.googlejavaformat.java.Main; | |
/** | |
* Formats Java source files with Google Formats. | |
* | |
* @author Michael J. Simons | |
*/ | |
public class format_java { | |
public static void main(String... args) { | |
Main.main(args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment