Skip to content
An sbt plugin for formating Java code
Scala Java
Branch: master
Clone or download
Latest commit b9a6a69 Jul 1, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
plugin Rename the main key to javafmt Feb 15, 2019
project Update sbt-scalariform to 1.8.3 Jun 30, 2019
.gitignore removing type-safe values, too complex, not useful Jul 11, 2016
.travis.yml Switch to OpenJDK Jun 20, 2019
LICENSE Initial commit Dec 10, 2015 Prepare for v0.4.3 Feb 15, 2019 Create Jun 21, 2018

sbt-java-formatter scaladex-badge travis-badge

An sbt plugin for formatting Java code. This plugin began as a combination of ideas from this blog post and this maven plugin, though it has evolved since.


Add the plugin to project/plugins.sbt:

addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.4.3")

Use scaladex-badge for sbt 1.x, and 0.2.0 for previous versions of sbt.


This plugin uses the Google Java Format library, which makes it quite opinionated and not particularly configurable.

If you want to tweak the format, take a minute to consider whether it is really worth it, and have a look at the motivations in the Google Java Style Guide. If you decide you really need more flexibility, you could consider other plugins such as the sbt-checkstyle-plugin


Yes, we'll happily accept PRs to improve the plugin, but please note that the plugin is very rough around the edges.

Take a look at the contributors graph if you want to contact any of the contributors directly.


Apache v2

You can’t perform that action at this time.