Class BlossomExtension

java.lang.Object
net.kyori.blossom.BlossomExtension

public class BlossomExtension extends Object
The Blossom extension.
  • Field Details

    • project

      protected transient org.gradle.api.Project project
      The project this extension is for.
  • Constructor Details

    • BlossomExtension

      public BlossomExtension(Blossom blossom)
      Creates a new BlossomExtension.
      Parameters:
      blossom - blossom instance
  • Method Details

    • replaceToken

      public void replaceToken(Object token, Object replacement)
      Replace a token.
      Parameters:
      token - The token
      replacement - The replacement
    • replaceToken

      public void replaceToken(Map<Object,Object> map)
      Replaces a map of tokens, where the map key is the 'token' and the corresponding value is the 'replacement'.
      See Also:
    • replaceTokenIn

      public void replaceTokenIn(String location)
      Add a location where global tokens should be performed.
      Parameters:
      location - The location
    • replaceToken

      public void replaceToken(Object token, Object replacement, Object file)
      Replace a token in a specific file.
      Parameters:
      token - The token
      replacement - The replacement
      file - The file
    • getTokenReplacementsGlobal

      public Map<String,Object> getTokenReplacementsGlobal()
      Gets the global token replacements.
      Returns:
      The global token replacements
    • getTokenReplacementsGlobalLocations

      public List<String> getTokenReplacementsGlobalLocations()
      Gets the global token replacement locations.
      Returns:
      The global token replacement locations
    • getTokenReplacementsByFile

      public com.google.common.collect.Multimap<String,Map<String,Object>> getTokenReplacementsByFile()
      Gets the by-file token replacements.
      Returns:
      The by-file token replacements