Package com.diffplug.gradle.spotless
Interface HasBuiltinDelimiterForLicense
-
- All Known Implementing Classes:
Antlr4Extension
,CppExtension
,GroovyExtension
,JavaExtension
,KotlinExtension
public interface HasBuiltinDelimiterForLicense
EveryFormatExtension
has a methodlicense(licenseContent, licenseDelimiter)
, where licenseDelimiter is a regex that separates the license part of the code from the content. For some kinds of format - such asjava
,kotlin
, andgroovy
- we already have a defined delimiter, so users don't have to provide it. By having the java, kotlin, and groovy formats implement this interface, you can write generic code for enforcing whitespace and licenses.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FormatExtension.LicenseHeaderConfig
licenseHeader(String licenseHeader)
FormatExtension.LicenseHeaderConfig
licenseHeaderFile(Object licenseHeaderFile)
-
-
-
Method Detail
-
licenseHeader
FormatExtension.LicenseHeaderConfig licenseHeader(String licenseHeader)
- Parameters:
licenseHeader
- Content that should be at the top of every file.
-
licenseHeaderFile
FormatExtension.LicenseHeaderConfig licenseHeaderFile(Object licenseHeaderFile)
- Parameters:
licenseHeaderFile
- Content that should be at the top of every file.
-
-