Package com.diffplug.gradle.spotless
Class GroovyExtension
- java.lang.Object
-
- com.diffplug.gradle.spotless.FormatExtension
-
- com.diffplug.gradle.spotless.BaseGroovyExtension
-
- com.diffplug.gradle.spotless.GroovyExtension
-
- All Implemented Interfaces:
HasBuiltinDelimiterForLicense
public class GroovyExtension extends BaseGroovyExtension implements HasBuiltinDelimiterForLicense
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.diffplug.gradle.spotless.BaseGroovyExtension
BaseGroovyExtension.GrEclipseConfig
-
Nested classes/interfaces inherited from class com.diffplug.gradle.spotless.FormatExtension
FormatExtension.BiomeGeneric, FormatExtension.ClangFormatConfig, FormatExtension.EclipseWtpConfig, FormatExtension.LicenseHeaderConfig, FormatExtension.NpmStepConfig<T extends FormatExtension.NpmStepConfig<?>>, FormatExtension.PrettierConfig, FormatExtension.RomeGeneric
-
-
Field Summary
-
Fields inherited from class com.diffplug.gradle.spotless.FormatExtension
steps, target, targetExclude, targetExcludeContentPattern
-
-
Constructor Summary
Constructors Constructor Description GroovyExtension(SpotlessExtension spotless)
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description voidexcludeJava()Excludes .java files, to focus on only .groovy files.voidexcludeJava(boolean excludeJava)Determines whether to exclude .java files, to focus on only .groovy files.default FileCollectiongetSources(Project project, java.lang.String message, java.util.function.Function<SourceSet,SourceDirectorySet> sourceSetSourceDirectory, Spec<? super java.io.File> filterSpec)FormatExtension.LicenseHeaderConfiglicenseHeader(java.lang.String licenseHeader)FormatExtension.LicenseHeaderConfiglicenseHeaderFile(java.lang.Object licenseHeaderFile)protected voidsetupTask(SpotlessTask task)If the user hasn't specified the files yet, we'll assume he/she means all of the groovy files.-
Methods inherited from class com.diffplug.gradle.spotless.BaseGroovyExtension
greclipse, greclipse, importOrder, importOrderFile, removeSemicolons
-
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, getEncoding, getExistingStepIdx, getLineEndings, getProject, getRatchetFrom, ignoreErrorForPath, ignoreErrorForStep, indentWithSpaces, indentWithSpaces, indentWithTabs, indentWithTabs, isLicenseHeaderStep, licenseHeader, licenseHeaderFile, nativeCmd, noDefaultTargetException, parseTarget, prettier, prettier, prettier, provisioner, ratchetFrom, replace, replaceRegex, replaceStep, rome, rome, setEncoding, setEncoding, setLineEndings, setRatchetFrom, target, targetExclude, targetExcludeIfContentContains, targetExcludeIfContentContainsRegex, toggleOffOn, toggleOffOn, toggleOffOnDisable, toggleOffOnRegex, trimTrailingWhitespace, withinBlocks, withinBlocks, withinBlocksRegex, withinBlocksRegex
-
-
-
-
Constructor Detail
-
GroovyExtension
@Inject public GroovyExtension(SpotlessExtension spotless)
-
-
Method Detail
-
excludeJava
public void excludeJava()
Excludes .java files, to focus on only .groovy files.
-
excludeJava
public void excludeJava(boolean excludeJava)
Determines whether to exclude .java files, to focus on only .groovy files.
-
licenseHeader
public FormatExtension.LicenseHeaderConfig licenseHeader(java.lang.String licenseHeader)
- Specified by:
licenseHeaderin interfaceHasBuiltinDelimiterForLicense- Parameters:
licenseHeader- Content that should be at the top of every file.
-
licenseHeaderFile
public FormatExtension.LicenseHeaderConfig licenseHeaderFile(java.lang.Object licenseHeaderFile)
- Specified by:
licenseHeaderFilein interfaceHasBuiltinDelimiterForLicense- Parameters:
licenseHeaderFile- Content that should be at the top of every file.
-
setupTask
protected void setupTask(SpotlessTask task)
If the user hasn't specified the files yet, we'll assume he/she means all of the groovy files.- Overrides:
setupTaskin classFormatExtension
-
getSources
public default FileCollection getSources(Project project, java.lang.String message, java.util.function.Function<SourceSet,SourceDirectorySet> sourceSetSourceDirectory, Spec<? super java.io.File> filterSpec)
-
-