Class JacetExtension
java.lang.Object
de.irotation.jacet.gradle.JacetExtension
DSL extension for configuring the jacet formatter.
Configuration is layered, highest priority last: built-in FormatterOptions.defaults() <
.jacet.json < this jacet { } block. The plugin loads .jacet.json by walking up from the
project directory (mirroring the CLI); any property set here overrides the file. An unset property falls through to
the file value, then to the default shown below. The string-valued properties accept a fixed vocabulary and fail the
build with a clear message on any other value (see applyOverrides(FormatterOptions)).
Use configFile to point at a specific .jacet.json instead of the walk-up lookup (the counterpart
of the CLI's --config).
jacet {
configFile = file("config/.jacet.json") // optional: skip walk-up, use this file
printWidth = 140 // line width, default 140
tabWidth = 2 // indent width, default 2
useTabs = false // indent with tabs, default false
forceBraces = true // brace single-statement bodies, default true
endOfLine = "lf" // one of: lf, crlf, cr, auto; default lf
staticImports = "top" // one of: top, bottom, mixed; default top
importGroups = ["java", "javax", "jakarta", "org", "com", "de"] // ordered group prefixes
}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.file.RegularFilePropertyabstract org.gradle.api.provider.Property<String> abstract org.gradle.api.provider.Property<Boolean> abstract org.gradle.api.provider.ListProperty<String> abstract org.gradle.api.provider.Property<Integer> abstract org.gradle.api.provider.Property<String> abstract org.gradle.api.provider.Property<Integer> abstract org.gradle.api.provider.Property<Boolean>
-
Constructor Details
-
JacetExtension
public JacetExtension()
-
-
Method Details
-
getConfigFile
public abstract org.gradle.api.file.RegularFileProperty getConfigFile() -
getPrintWidth
-
getTabWidth
-
getUseTabs
-
getForceBraces
-
getEndOfLine
-
getStaticImports
-
getImportGroups
-