Package net.kyori.blossom.task
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
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionorg.gradle.api.file.SourceDirectorySetgetInput()Get the input location.Get the output location.Get the by-file token replacements.Get the global token replacements.Get the global token replacement locations.voidrun()Perform the source replacement task.voidsetInput(org.gradle.api.file.SourceDirectorySet input) Set the input location.voidSet the output location.voidsetTokenReplacementsByFile(com.google.common.collect.Multimap<String, Map<String, Object>> map) Set the by-file token replacements.voidSet the global token replacements.voidsetTokenReplacementsGlobalLocations(List<String> locations) 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, usesServiceMethods 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, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Field Details
-
output
-
-
Constructor Details
-
SourceReplacementTask
public SourceReplacementTask()
-
-
Method Details
-
run
Perform the source replacement task.- Throws:
IOException- when anIOExceptionoccurs 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
Get the output location.- Returns:
- The output location
-
setOutput
Set the output location.- Parameters:
output- The output location
-
getTokenReplacementsGlobal
Get the global token replacements.- Returns:
- The global token replacements
-
setTokenReplacementsGlobal
Set the global token replacements.- Parameters:
map- The global token replacements
-
getTokenReplacementsGlobalLocations
Get the global token replacement locations.- Returns:
- The global token replacement locations
-
setTokenReplacementsGlobalLocations
Set the global token replacement locations.- Parameters:
locations- The global token replacement locations
-
getTokenReplacementsByFile
@Input public com.google.common.collect.Multimap<String,Map<String, getTokenReplacementsByFile()Object>> 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
-