public class KotlinExtension extends FormatExtension implements HasBuiltinDelimiterForLicense
| Modifier and Type | Class and Description |
|---|---|
class |
KotlinExtension.KotlinFormatExtension |
class |
KotlinExtension.KtfmtConfig |
FormatExtension.EclipseWtpConfig, FormatExtension.LicenseHeaderConfig, FormatExtension.NpmStepConfig<T extends FormatExtension.NpmStepConfig<?>>, FormatExtension.PrettierConfigsteps, target, targetExclude| Constructor and Description |
|---|
KotlinExtension(SpotlessExtensionBase spotless) |
| Modifier and Type | Method and Description |
|---|---|
KotlinExtension.KtfmtConfig |
ktfmt()
Uses the ktfmt jar to format source code.
|
KotlinExtension.KtfmtConfig |
ktfmt(String version)
Uses the given version of ktfmt to format source
code.
|
KotlinExtension.KotlinFormatExtension |
ktlint() |
KotlinExtension.KotlinFormatExtension |
ktlint(String version)
Adds the specified version of ktlint.
|
FormatExtension.LicenseHeaderConfig |
licenseHeader(String licenseHeader) |
FormatExtension.LicenseHeaderConfig |
licenseHeaderFile(Object licenseHeaderFile) |
protected void |
setupTask(SpotlessTask task)
If the user hasn’t specified the files yet, we’ll assume he/she means all of the kotlin files.
|
addStep, bumpThisNumberIfACustomStepChanges, clearSteps, createIndependentApplyTask, custom, custom, customLazy, customLazyGroovy, eclipseWtp, eclipseWtp, encoding, endWithNewline, getEncoding, getExistingStep, getExistingStepIdx, getLineEndings, getProject, getRatchetFrom, ignoreErrorForPath, ignoreErrorForStep, indentWithSpaces, indentWithSpaces, indentWithTabs, indentWithTabs, licenseHeader, licenseHeaderFile, paddedCell, paddedCell, parseTarget, prettier, prettier, prettier, provisioner, ratchetFrom, replace, replaceRegex, replaceStep, setEncoding, setEncoding, setLineEndings, setRatchetFrom, target, targetExclude, trimTrailingWhitespacepublic KotlinExtension(SpotlessExtensionBase spotless)
public FormatExtension.LicenseHeaderConfig licenseHeader(String licenseHeader)
licenseHeader in interface HasBuiltinDelimiterForLicenselicenseHeader - Content that should be at the top of every file.public FormatExtension.LicenseHeaderConfig licenseHeaderFile(Object licenseHeaderFile)
licenseHeaderFile in interface HasBuiltinDelimiterForLicenselicenseHeaderFile - Content that should be at the top of every file.public KotlinExtension.KotlinFormatExtension ktlint(String version)
Adds the specified version of ktlint.
public KotlinExtension.KotlinFormatExtension ktlint()
public KotlinExtension.KtfmtConfig ktfmt()
Uses the ktfmt jar to format source code.
public KotlinExtension.KtfmtConfig ktfmt(String version)
Uses the given version of ktfmt to format source code.
protected void setupTask(SpotlessTask task)
If the user hasn’t specified the files yet, we’ll assume he/she means all of the kotlin files.
setupTask in class FormatExtension