Package com.diffplug.gradle.spotless
Class KotlinExtension
java.lang.Object
com.diffplug.gradle.spotless.FormatExtension
com.diffplug.gradle.spotless.BaseKotlinExtension
com.diffplug.gradle.spotless.KotlinExtension
- All Implemented Interfaces:
HasBuiltinDelimiterForLicense
-
Nested Class Summary
Nested classes/interfaces inherited from class com.diffplug.gradle.spotless.BaseKotlinExtension
BaseKotlinExtension.DiktatConfig, BaseKotlinExtension.KtfmtConfig, BaseKotlinExtension.KtlintConfig
Nested classes/interfaces inherited from class com.diffplug.gradle.spotless.FormatExtension
FormatExtension.BiomeGeneric, FormatExtension.ClangFormatConfig, FormatExtension.EclipseWtpConfig, FormatExtension.IdeaConfig, FormatExtension.LicenseHeaderConfig, FormatExtension.NpmStepConfig<T extends FormatExtension.NpmStepConfig<?>>, FormatExtension.PrettierConfig
-
Field Summary
Fields inherited from class com.diffplug.gradle.spotless.FormatExtension
steps, target, targetExclude, targetExcludeContentPattern
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefault FileCollection
getSources
(Project project, String message, Function<SourceSet, SourceDirectorySet> sourceSetSourceDirectory, Spec<? super File> filterSpec) protected boolean
isScript()
licenseHeader
(String licenseHeader) 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.Methods inherited from class com.diffplug.gradle.spotless.BaseKotlinExtension
diktat, diktat, ktfmt, ktfmt, ktlint, ktlint
Methods inherited from class com.diffplug.gradle.spotless.FormatExtension
addStep, addStep, biome, biome, bumpThisNumberIfACustomStepChanges, clangFormat, clangFormat, clearSteps, createIndependentApplyTask, createIndependentApplyTaskLazy, custom, custom, eclipseWtp, eclipseWtp, encoding, endWithNewline, forbidRegex, getEncoding, getExistingStepIdx, getLineEndings, getProject, getRatchetFrom, idea, ignoreErrorForPath, ignoreErrorForStep, indentWithSpaces, indentWithSpaces, indentWithTabs, indentWithTabs, isLicenseHeaderStep, leadingSpacesToTabs, leadingSpacesToTabs, leadingTabsToSpaces, leadingTabsToSpaces, licenseHeader, licenseHeaderFile, nativeCmd, noDefaultTargetException, parseTarget, prettier, prettier, prettier, provisioner, ratchetFrom, replace, replaceRegex, replaceStep, setEncoding, setEncoding, setLineEndings, setRatchetFrom, suppressLintsFor, target, targetExclude, targetExcludeIfContentContains, targetExcludeIfContentContainsRegex, toggleOffOn, toggleOffOn, toggleOffOnDisable, toggleOffOnRegex, trimTrailingWhitespace, withinBlocks, withinBlocks, withinBlocksRegex, withinBlocksRegex
-
Constructor Details
-
KotlinExtension
-
-
Method Details
-
licenseHeader
- Specified by:
licenseHeader
in interfaceHasBuiltinDelimiterForLicense
- Parameters:
licenseHeader
- Content that should be at the top of every file.
-
licenseHeaderFile
- Specified by:
licenseHeaderFile
in interfaceHasBuiltinDelimiterForLicense
- Parameters:
licenseHeaderFile
- Content that should be at the top of every file.
-
isScript
protected boolean isScript()- Specified by:
isScript
in classBaseKotlinExtension
-
setupTask
If the user hasn't specified the files yet, we'll assume he/she means all of the kotlin files.- Overrides:
setupTask
in classFormatExtension
-
getSources
default FileCollection getSources(Project project, String message, Function<SourceSet, SourceDirectorySet> sourceSetSourceDirectory, Spec<? super File> filterSpec)
-