Package com.diffplug.gradle.spotless
Interface HasBuiltinDelimiterForLicense
- All Known Implementing Classes:
Antlr4Extension,CppExtension,GroovyExtension,JavaExtension,KotlinExtension,ProtobufExtension
public interface HasBuiltinDelimiterForLicense
Every
FormatExtension has a method
license(licenseContent, licenseDelimiter),
where licenseDelimiter is a regex that separates the license part of the code from the content.
For some kinds of format -
such as java, kotlin, and groovy -
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
Modifier and TypeMethodDescriptionlicenseHeader(String licenseHeader) licenseHeaderFile(Object licenseHeaderFile)
-
Method Details
-
licenseHeader
- Parameters:
licenseHeader- Content that should be at the top of every file.
-
licenseHeaderFile
- Parameters:
licenseHeaderFile- Content that should be at the top of every file.
-