-
Notifications
You must be signed in to change notification settings - Fork 2
Java Configuration
Java formatter configuration.
import net.moznion.sbt.spotless.config._
lazy val root = (project in file("."))
.settings(
name := "Example",
spotlessJava := JavaConfig(
googleJavaFormat = GoogleJavaFormatConfig(version = "1.7"),
removeUnusedImports = true,
importOrder = Seq("java", "javax", "org", "com"),
),
)
spotlessJava
: JavaConfig
This configuration accepts to embed Formatter Common Configuration.
*.java
files that are under the project source directory.
Default Value: no value
The formatter configuration for google-java-format.
googleJavaFormat = GoogleJavaFormatConfig(
version = null,
style = null,
)
default value: depends on dependent Spotless version
The version of google-java-format.
default value: depends on dependent Spotless version
A style name for google-java-format. Please refer to the following code: https://github.com/google/google-java-format/blob/master/core/src/main/java/com/google/googlejavaformat/java/JavaFormatterOptions.java
Default Value: no value
The formatter configuration for Eclipse jdt Formatter.
eclipseJava = GoogleJavaFormatConfig(
version = null,
configFiles = null,
)
default value: depends on dependent Spotless version
The version of Eclipse jdt Formetter.
Supported versions are on the following: https://github.com/diffplug/spotless/tree/master/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter
default value: empty list
Configuration files for Eclipse jdt Formatter.
Default Value: no value
A seq of import order for java files.
Default Value: no value
A file that contains import order for java files.
Default Value: false
A specifier of whether to remove unused imports or not.
default value: null
License header string to prefix a that before the package statement.
default value: null
License header file to prefix a that before the package statement.