Package net.kyori.blossom
Interface TemplateSet
- All Superinterfaces:
org.gradle.api.Named
- All Known Subinterfaces:
ResourceTemplateSet,SourceTemplateSet,TemplateSetInternal
- All Known Implementing Classes:
ResourceTemplateSetImpl,SourceTemplateSetImpl,TemplateSetImpl
@NonExtendable
public interface TemplateSet
extends org.gradle.api.Named
A set of templates associated with one source sets.
A template set can represent source or resource templates, including source templates for different languages.
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Method Summary
Modifier and TypeMethodDescription@NotNull org.gradle.api.provider.Property<String>A literal header to insert at the top of generated source files.@NotNull org.gradle.api.file.SourceDirectorySetDirectories providing templates which can be included into process templates, but which will not be processed for output themselves.@NotNull StringgetName()Runtime-defined properties.@NotNull org.gradle.api.file.ConfigurableFileCollectionA collection of data files in YAML format.@NotNull org.gradle.api.file.SourceDirectorySetDirectories containing templates.@NotNull org.gradle.api.NamedDomainObjectContainer<Variant>A container of template variants.default voidAdd includes directories to the template path.default voidSet a single property for this template.default voidSet a single property for this template.default voidpropertyFile(@NotNull Object dataFile) Add a data file for variable data.default voidAdd one or more directories containing templates.default voidRegister variants with certain names to be produced.default voidvariants(@NotNull org.gradle.api.Action<org.gradle.api.NamedDomainObjectSet<Variant>> configureAction) Configure produced variants.
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.gradle.api.Named
-
getPropertyFiles
@InputFiles @NotNull @NotNull org.gradle.api.file.ConfigurableFileCollection getPropertyFiles()A collection of data files in YAML format.- Returns:
- the data file collection
- Since:
- 2.0.0
-
propertyFile
Add a data file for variable data.- Parameters:
dataFile- the data file to add, evaluated as perProject.file(Object)- Since:
- 2.0.0
-
getProperties
Runtime-defined properties.These properties will override anything in the data files.
- Returns:
- the properties
- Since:
- 2.0.0
-
property
Set a single property for this template.- Parameters:
property- the propertyvalue- the value for the property- Since:
- 2.0.0
-
property
Set a single property for this template.- Parameters:
property- the propertyvalue- the provider providing a value for the property- Since:
- 2.0.0
-
getHeader
A literal header to insert at the top of generated source files.This property is optional.
- Returns:
- the header
- Since:
- 2.0.0
-
getVariants
A container of template variants.Variants will process the same templates, but with different property values.
- Returns:
- the variants collection
- Since:
- 2.0.0
-
variants
Register variants with certain names to be produced.- Parameters:
variants- the variants to produce- Since:
- 2.0.0
-
variants
default void variants(@NotNull @NotNull org.gradle.api.Action<org.gradle.api.NamedDomainObjectSet<Variant>> configureAction) Configure produced variants.- Parameters:
configureAction- an action to configure variants- Since:
- 2.0.0
-
getTemplates
@Internal @NotNull @NotNull org.gradle.api.file.SourceDirectorySet getTemplates()Directories containing templates.All templates share a common namespace, so templates in directories that come first will override templates that come later.
- Returns:
- the templates to process
- Since:
- 2.0.0
-
templates
Add one or more directories containing templates.- Parameters:
templates- the template directories to add, evaluated followingProject.files(Object...)- Since:
- 2.0.0
-
getIncludes
@Internal @NotNull @NotNull org.gradle.api.file.SourceDirectorySet getIncludes()Directories providing templates which can be included into process templates, but which will not be processed for output themselves.- Returns:
- the includes directories
- Since:
- 2.0.0
-
include
Add includes directories to the template path.- Parameters:
includes- the includes directories to add, processed as inProject.files(Object...)- Since:
- 2.0.0
- See Also:
-