Package net.kyori.blossom
Class BlossomExtension
java.lang.Object
net.kyori.blossom.BlossomExtension
The Blossom extension.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.gradle.api.ProjectThe project this extension is for. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the by-file token replacements.Gets the global token replacements.Gets the global token replacement locations.voidreplaceToken(Object token, Object replacement) Replace a token.voidreplaceToken(Object token, Object replacement, Object file) Replace a token in a specific file.voidreplaceToken(Map<Object, Object> map) Replaces a map of tokens, where the map key is the 'token' and the corresponding value is the 'replacement'.voidreplaceTokenIn(String location) Add a location where global tokens should be performed.
-
Field Details
-
project
protected transient org.gradle.api.Project projectThe project this extension is for.
-
-
Constructor Details
-
BlossomExtension
Creates a newBlossomExtension.- Parameters:
blossom- blossom instance
-
-
Method Details
-
replaceToken
Replace a token.- Parameters:
token- The tokenreplacement- The replacement
-
replaceToken
Replaces a map of tokens, where the map key is the 'token' and the corresponding value is the 'replacement'.- See Also:
-
replaceTokenIn
Add a location where global tokens should be performed.- Parameters:
location- The location
-
replaceToken
Replace a token in a specific file.- Parameters:
token- The tokenreplacement- The replacementfile- The file
-
getTokenReplacementsGlobal
Gets the global token replacements.- Returns:
- The global token replacements
-
getTokenReplacementsGlobalLocations
Gets the global token replacement locations.- Returns:
- The global token replacement locations
-
getTokenReplacementsByFile
Gets the by-file token replacements.- Returns:
- The by-file token replacements
-