Class SourceReplacementTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
net.kyori.blossom.task.SourceReplacementTask
All Implemented Interfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>

public class SourceReplacementTask extends org.gradle.api.DefaultTask
Task for replacing tokens in source code files.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gradle.api.Task

    org.gradle.api.Task.Namer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from interface org.gradle.api.Task

    TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gradle.api.file.SourceDirectorySet
    Get the input location.
    Get the output location.
    com.google.common.collect.Multimap<String,Map<String,Object>>
    Get the by-file token replacements.
    Get the global token replacements.
    Get the global token replacement locations.
    void
    run()
    Perform the source replacement task.
    void
    setInput(org.gradle.api.file.SourceDirectorySet input)
    Set the input location.
    void
    setOutput(File output)
    Set the output location.
    void
    setTokenReplacementsByFile(com.google.common.collect.Multimap<String,Map<String,Object>> map)
    Set the by-file token replacements.
    void
    Set the global token replacements.
    void
    Set the global token replacement locations.

    Methods inherited from class org.gradle.api.DefaultTask

    compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService

    Methods inherited from class org.gradle.api.internal.AbstractTask

    appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.Task

    doNotTrackState, getConvention, notCompatibleWithConfigurationCache
  • Field Details

    • output

      public File output
  • Constructor Details

    • SourceReplacementTask

      public SourceReplacementTask()
  • Method Details

    • run

      public void run() throws IOException
      Perform the source replacement task.
      Throws:
      IOException - when an IOException occurs during task execution
    • getInput

      @InputFiles public org.gradle.api.file.SourceDirectorySet getInput()
      Get the input location.
      Returns:
      The input location
    • setInput

      public void setInput(org.gradle.api.file.SourceDirectorySet input)
      Set the input location.
      Parameters:
      input - The input location
    • getOutput

      @OutputDirectory public File getOutput()
      Get the output location.
      Returns:
      The output location
    • setOutput

      public void setOutput(File output)
      Set the output location.
      Parameters:
      output - The output location
    • getTokenReplacementsGlobal

      @Input public Map<String,Object> getTokenReplacementsGlobal()
      Get the global token replacements.
      Returns:
      The global token replacements
    • setTokenReplacementsGlobal

      public void setTokenReplacementsGlobal(Map<String,Object> map)
      Set the global token replacements.
      Parameters:
      map - The global token replacements
    • getTokenReplacementsGlobalLocations

      @Input public List<String> getTokenReplacementsGlobalLocations()
      Get the global token replacement locations.
      Returns:
      The global token replacement locations
    • setTokenReplacementsGlobalLocations

      public void setTokenReplacementsGlobalLocations(List<String> locations)
      Set the global token replacement locations.
      Parameters:
      locations - The global token replacement locations
    • getTokenReplacementsByFile

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

      public void setTokenReplacementsByFile(com.google.common.collect.Multimap<String,Map<String,Object>> map)
      Set the by-file token replacements.
      Parameters:
      map - The by-file token replacements