google-java-format
Google Java Format (https://github.com/google/google-java-format)
Backend: pants.backend.experimental.java.lint.google_java_format
Config section: [google-java-format]
Basic options
False
If true, don't use Google Java Format when running pants fmt
and pants lint
.
False
Use AOSP style instead of Google Style (4-space indentation). ("AOSP" is the Android Open Source Project.)
Advanced options
1.13.0
Version string for the tool. This is available for substitution in the [google-java-format].artifacts
option by including the string {version}
.
artifacts
artifacts
--google-java-format-artifacts="['<str>', '<str>', ...]"
PANTS_GOOGLE_JAVA_FORMAT_ARTIFACTS
[ "com.google.googlejavaformat:google-java-format:{version}" ]
Artifact requirements for this tool using specified as either the address of a jvm_artifact
target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version
). For Maven coordinates, the string {version}
version will be substituted with the value of the [google-java-format].version
option.
<default>
Path to a lockfile used for installing the tool.
Set to the string <default>
to use a lockfile provided by Pants, so long as you have not changed the --version
option. See https://github.com/pantsbuild/pants/blob/release_2.18.1/src/python/pants/backend/java/lint/google_java_format/google_java_format.default.lockfile.txt for the default lockfile contents.
To use a custom lockfile, set this option to a file path relative to the build root, then run pants jvm-generate-lockfiles --resolve=google-java-format
.
jvm_options
jvm_options
--google-java-format-jvm-options="['<str>', '<str>', ...]"
PANTS_GOOGLE_JAVA_FORMAT_JVM_OPTIONS
[]
List of JVM options to pass to google-java-format
JVM processes.
Options set here will be added to those set in [jvm].global_options
. Please check the documentation for the jvm
subsystem to see what values are accepted here.
Deprecated options
None
Updated 2 days ago