public class KotlinExtension extends FormatExtension implements HasBuiltinDelimiterForLicense
Modifier and Type | Class and Description |
---|---|
class |
KotlinExtension.KotlinFormatExtension |
class |
KotlinExtension.KtfmtConfig |
FormatExtension.ClangFormatConfig, FormatExtension.EclipseWtpConfig, FormatExtension.LicenseHeaderConfig, FormatExtension.NpmStepConfig<T extends FormatExtension.NpmStepConfig<?>>, FormatExtension.PrettierConfig
steps, target, targetExclude
Constructor and Description |
---|
KotlinExtension(SpotlessExtension 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 and applies the dropbox style
option 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, clangFormat, clangFormat, clearSteps, createIndependentApplyTask, custom, custom, eclipseWtp, eclipseWtp, encoding, endWithNewline, getEncoding, getExistingStepIdx, getLineEndings, getProject, getRatchetFrom, ignoreErrorForPath, ignoreErrorForStep, indentWithSpaces, indentWithSpaces, indentWithTabs, indentWithTabs, licenseHeader, licenseHeaderFile, noDefaultTargetException, parseTarget, prettier, prettier, prettier, provisioner, ratchetFrom, replace, replaceRegex, replaceStep, setEncoding, setEncoding, setLineEndings, setRatchetFrom, target, targetExclude, toggleOffOn, toggleOffOn, toggleOffOnDisable, toggleOffOnRegex, trimTrailingWhitespace
public KotlinExtension(SpotlessExtension spotless)
public FormatExtension.LicenseHeaderConfig licenseHeader(String licenseHeader)
licenseHeader
in interface HasBuiltinDelimiterForLicense
licenseHeader
- Content that should be at the top of every file.public FormatExtension.LicenseHeaderConfig licenseHeaderFile(Object licenseHeaderFile)
licenseHeaderFile
in interface HasBuiltinDelimiterForLicense
licenseHeaderFile
- 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 and applies the dropbox style option 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