Class GenerateEmitterSourcesTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.arc_e_tect.gradle.apionly.transcriberj.ContractSourcesTask
com.arc_e_tect.gradle.apionly.transcriberj.GenerateEmitterSourcesTask
- 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>
Generates one emitter's output for one contract, over the same model the core generates from:
its Java sources, its classpath resources and its files, each in a directory of its own. Its
inputs are the contract, the settings the model depends on, and this emitter's id, options and
classpath, so changing another emitter's options leaves it up to date.
-
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 TypeMethodDescriptionvoidgenerate()Generates the emitter's output.abstract org.gradle.api.file.RegularFilePropertyWhere the emitter's part of the report goes, as AsciiDoc.abstract org.gradle.api.file.ConfigurableFileCollectionThe emitter libraries.abstract org.gradle.api.provider.Property<String> The emitter's id.abstract org.gradle.api.provider.Property<String> The emitter's version, as thetranscriberjEmittersconfiguration resolves it, for the provenance of the files it writes.abstract org.gradle.api.file.DirectoryPropertyWhere the emitter's files go.abstract org.gradle.api.file.DirectoryPropertyWhere the emitter's Java sources go.The emitter's options.abstract org.gradle.api.file.RegularFilePropertyWhere the provenance of the emitter's files goes: absent for an emitter that writes none.abstract org.gradle.api.file.RegularFilePropertyWhere the emitter's part of the report goes, as JSON.abstract org.gradle.api.file.DirectoryPropertyWhere the emitter's classpath resources go.abstract org.gradle.api.file.RegularFilePropertygetStamp()Where the contract version and hash the output was generated from are recorded, forverifyContractSources<Contract>.abstract org.gradle.api.provider.Property<String> The TranscriberJ's version, for the provenance of the files the emitter writes.protected abstract org.gradle.workers.WorkerExecutorGradle's worker executor.Methods inherited from class com.arc_e_tect.gradle.apionly.transcriberj.ContractSourcesTask
getAsyncContract, getBasePackage, getContract, getContractName, getDerive, getDescriptionBundle, getDescriptionPlaceholder, getGenerateDocs, getInvalidRequestStatus, getLockfile, getRecursionDepth, getStrictRequests, getValidateFormatsMethods 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
-
GenerateEmitterSourcesTask
public GenerateEmitterSourcesTask()Creates the task.
-
-
Method Details
-
getEmitterId
The emitter's id.- Returns:
- the id
-
getOptions
The emitter's options.- Returns:
- the options
-
getEmitterVersion
The emitter's version, as thetranscriberjEmittersconfiguration resolves it, for the provenance of the files it writes.- Returns:
- the version
-
getTranscriberJVersion
The TranscriberJ's version, for the provenance of the files the emitter writes.- Returns:
- the version
-
getEmitterClasspath
@Classpath public abstract org.gradle.api.file.ConfigurableFileCollection getEmitterClasspath()The emitter libraries.- Returns:
- the classpath
-
getJavaDirectory
@OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getJavaDirectory()Where the emitter's Java sources go.- Returns:
- the directory
-
getResourceDirectory
@OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getResourceDirectory()Where the emitter's classpath resources go.- Returns:
- the directory
-
getFilesDirectory
@OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getFilesDirectory()Where the emitter's files go.- Returns:
- the directory
-
getReportFragment
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getReportFragment()Where the emitter's part of the report goes, as JSON.- Returns:
- the fragment
-
getAsciiDocFragment
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getAsciiDocFragment()Where the emitter's part of the report goes, as AsciiDoc.- Returns:
- the fragment
-
getStamp
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getStamp()Where the contract version and hash the output was generated from are recorded, forverifyContractSources<Contract>.- Returns:
- the stamp
-
getProvenance
@OutputFile @Optional public abstract org.gradle.api.file.RegularFileProperty getProvenance()Where the provenance of the emitter's files goes: absent for an emitter that writes none.- Returns:
- the provenance file
-
getWorkerExecutor
@Inject protected abstract org.gradle.workers.WorkerExecutor getWorkerExecutor()Gradle's worker executor.- Returns:
- the executor
-
generate
public void generate()Generates the emitter's output.
-