Package com.diffplug.gradle.spotless
Class FormatExtension.LicenseHeaderConfig
java.lang.Object
com.diffplug.gradle.spotless.FormatExtension.LicenseHeaderConfig
- Enclosing class:
FormatExtension
Created by
FormatExtension.licenseHeader(String, String)
or
FormatExtension.licenseHeaderFile(Object, String)
. For most
language-specific formats (e.g. java, scala, etc.) you can omit the second
delimiter
argument, because it is supplied automatically
(HasBuiltinDelimiterForLicense
).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiononlyIfContentMatches
(String contentPattern) skipLinesMatching
(String skipLinesMatching) updateYearWithLatest
(boolean updateYearWithLatest) yearSeparator
(String yearSeparator)
-
Constructor Details
-
LicenseHeaderConfig
-
-
Method Details
-
named
-
onlyIfContentMatches
-
delimiter
- Parameters:
delimiter
- Spotless will look for a line that starts with this regular expression pattern to know what the "top" is.
-
yearSeparator
- Parameters:
yearSeparator
- The characters used to separate the first and last years in multi years patterns.
-
skipLinesMatching
-
updateYearWithLatest
- Parameters:
updateYearWithLatest
- Will turn2004
into2004-2020
, and2004-2019
into2004-2020
Default value is false, unlessSpotlessExtension.ratchetFrom(String)
is used, in which case default value is true.
-