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.
Modifier and Type | Method and Description |
---|---|
com.diffplug.gradle.spotless.FormatExtension.LicenseHeaderConfig |
licenseHeader(String licenseHeader) |
com.diffplug.gradle.spotless.FormatExtension.LicenseHeaderConfig |
licenseHeaderFile(Object licenseHeaderFile) |
com.diffplug.gradle.spotless.FormatExtension.LicenseHeaderConfig licenseHeader(String licenseHeader)
licenseHeader
- Content that should be at the top of every file.com.diffplug.gradle.spotless.FormatExtension.LicenseHeaderConfig licenseHeaderFile(Object licenseHeaderFile)
licenseHeaderFile
- Content that should be at the top of every file.