google-java-format
Google Java Format (https://github.com/google/google-java-format)
Backend: ``
Config section: [google-java-format]
Basic options
aosp
--[no-]google-java-format-aosp
PANTS_GOOGLE_JAVA_FORMAT_AOSP
[google-java-format]
aosp = <bool>
False
Use AOSP style instead of Google Style (4-space indentation). ("AOSP" is the Android Open Source Project.)
skip
--[no-]google-java-format-skip
PANTS_GOOGLE_JAVA_FORMAT_SKIP
[google-java-format]
skip = <bool>
False
Don't use Google Java Format when running /home/josh/work/scie-pants/dist/pants fmt
and /home/josh/work/scie-pants/dist/pants lint
Advanced options
artifacts
--google-java-format-artifacts="['<str>', '<str>', ...]"
PANTS_GOOGLE_JAVA_FORMAT_ARTIFACTS
[google-java-format]
artifacts = [
'<str>',
'<str>',
...,
]
[ "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.
lockfile
--google-java-format-lockfile=<str>
PANTS_GOOGLE_JAVA_FORMAT_LOCKFILE
[google-java-format]
lockfile = <str>
<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.9.2/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
.
version
--google-java-format-version=<str>
PANTS_GOOGLE_JAVA_FORMAT_VERSION
[google-java-format]
version = <str>
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}
.
Deprecated options
None
Related subsystems
None