public class KotlinGradleExtension extends FormatExtension
| Modifier and Type | Class and Description |
|---|---|
class |
KotlinGradleExtension.KotlinFormatExtension |
class |
KotlinGradleExtension.KtfmtConfig |
FormatExtension.ClangFormatConfig, FormatExtension.EclipseWtpConfig, FormatExtension.LicenseHeaderConfig, FormatExtension.NpmStepConfig<T extends FormatExtension.NpmStepConfig<?>>, FormatExtension.PrettierConfigsteps, target, targetExclude| Constructor and Description |
|---|
KotlinGradleExtension(SpotlessExtension spotless) |
| Modifier and Type | Method and Description |
|---|---|
KotlinGradleExtension.KtfmtConfig |
ktfmt()
Uses the ktfmt jar to format source code.
|
KotlinGradleExtension.KtfmtConfig |
ktfmt(String version)
Uses the given version of ktfmt to format source
code.
|
KotlinGradleExtension.KotlinFormatExtension |
ktlint() |
KotlinGradleExtension.KotlinFormatExtension |
ktlint(String version)
Adds the specified version of ktlint.
|
protected void |
setupTask(SpotlessTask task)
Sets up a format task according to the values in this extension.
|
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, trimTrailingWhitespacepublic KotlinGradleExtension(SpotlessExtension spotless)
public KotlinGradleExtension.KotlinFormatExtension ktlint(String version)
Adds the specified version of ktlint.
public KotlinGradleExtension.KotlinFormatExtension ktlint()
public KotlinGradleExtension.KtfmtConfig ktfmt()
Uses the ktfmt jar to format source code.
public KotlinGradleExtension.KtfmtConfig ktfmt(String version)
Uses the given version of ktfmt to format source code.
protected void setupTask(SpotlessTask task)
FormatExtensionSets up a format task according to the values in this extension.
setupTask in class FormatExtension