Goethe is a code formatter library for square/javapoet using palantir-java-format.
The palantir-java-format that this library uses is shaded into a nested package to prevent coupling between human-generated code formatting and validation, and components which generate code automatically.
Formatting a javapoet JavaFile as a String:
String formatted = Goethe.formatAsString(javaFile);Formatting a JavaFile while writing it to an annotation processing Filer:
Goethe.formatAndEmit(javaFile, filer);./gradlew tasks - to get the list of gradle tasks
Run one of the following commands:
./gradlew ideafor IntelliJ./gradlew eclipsefor Eclipse