Package org.implab.gradle.xslt.tasks
Class XsltTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.implab.gradle.xslt.tasks.XsltTask
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.Named,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
@DisableCachingByDefault(because="XSLT transformations may resolve external resources not declared as task inputs.")
public abstract class XsltTask
extends org.gradle.api.DefaultTask
The task for applying an XSLT transformation. This task applies a single
transformation to a single document and produces a single result.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Field Summary
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 -
Method Summary
Modifier and TypeMethodDescriptionfragment(groovy.lang.Closure<?> configure) Creates an XML document fragment.abstract org.gradle.api.file.ConfigurableFileCollectionabstract org.gradle.api.provider.Property<Integer> abstract org.gradle.api.file.RegularFilePropertyorg.gradle.api.provider.Provider<Map<String, XsltParameter>> abstract org.gradle.api.file.RegularFilePropertyabstract org.gradle.api.file.RegularFilePropertyorg.apache.xpath.NodeSetnodeSet(groovy.lang.Closure<?> configure) Creates a nodeset.voidparameters(groovy.lang.Closure<?> configure) Conventional method, applies closure to the transformation parameters.voidparameters(Map<String, ?> parameters) Adds transformation parameters from a map.voidparameters(org.gradle.api.Action<? super Map<String, Object>> configure) Applies action to a temporary parameter map and adds collected values to transformation parameters.voidrun()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, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, 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, notCompatibleWithConfigurationCache
-
Constructor Details
-
XsltTask
@Inject public XsltTask(org.gradle.api.model.ObjectFactory objects)
-
-
Method Details
-
getStylesheet
@InputFile @PathSensitive(RELATIVE) public abstract org.gradle.api.file.RegularFileProperty getStylesheet() -
getSource
@InputFile @PathSensitive(RELATIVE) public abstract org.gradle.api.file.RegularFileProperty getSource() -
getIncludes
@InputFiles @Optional @PathSensitive(RELATIVE) public abstract org.gradle.api.file.ConfigurableFileCollection getIncludes() -
getOutput
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getOutput() -
getParameters
-
parameters
public void parameters(groovy.lang.Closure<?> configure) Conventional method, applies closure to the transformation parameters.The delegate for this closure is the map of values where the keys are the names of the parameters. Values could be either:
- simple values,
- nodes, nodeSets (
nodeSet(Closure)), - providers which supply simple values.
- Parameters:
configure- A closure for configuration of transformation parameters
-
parameters
Adds transformation parameters from a map.- Parameters:
parameters- The map of transformation parameters
-
parameters
Applies action to a temporary parameter map and adds collected values to transformation parameters.- Parameters:
configure- An action for configuration of transformation parameters
-
nodeSet
public org.apache.xpath.NodeSet nodeSet(groovy.lang.Closure<?> configure) Creates a nodeset. Can be used to construct a transformation parameter.- Parameters:
configure- A closure with inner nodes for this nodeSet.
-
fragment
Creates an XML document fragment. Can be used to construct a transformation parameter when the stylesheet expects a single fragment instead of a node set.- Parameters:
configure- A closure with inner nodes for this fragment.
-
getIndent
-
run
- Throws:
IOExceptionTransformerException
-