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>

@CacheableTask public abstract class GenerateEmitterSourcesTask extends ContractSourcesTask
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
    Constructor
    Description
    Creates the task.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Generates the emitter's output.
    abstract org.gradle.api.file.RegularFileProperty
    Where the emitter's part of the report goes, as AsciiDoc.
    abstract org.gradle.api.file.ConfigurableFileCollection
    The 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 the transcriberjEmitters configuration resolves it, for the provenance of the files it writes.
    abstract org.gradle.api.file.DirectoryProperty
    Where the emitter's files go.
    abstract org.gradle.api.file.DirectoryProperty
    Where the emitter's Java sources go.
    abstract org.gradle.api.provider.MapProperty<String,String>
    The emitter's options.
    abstract org.gradle.api.file.RegularFileProperty
    Where the provenance of the emitter's files goes: absent for an emitter that writes none.
    abstract org.gradle.api.file.RegularFileProperty
    Where the emitter's part of the report goes, as JSON.
    abstract org.gradle.api.file.DirectoryProperty
    Where the emitter's classpath resources go.
    abstract org.gradle.api.file.RegularFileProperty
    Where the contract version and hash the output was generated from are recorded, for verifyContractSources<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.WorkerExecutor
    Gradle's worker executor.

    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, usesService

    Methods 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, 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, notCompatibleWithConfigurationCache
  • Constructor Details

    • GenerateEmitterSourcesTask

      public GenerateEmitterSourcesTask()
      Creates the task.
  • Method Details

    • getEmitterId

      @Input public abstract org.gradle.api.provider.Property<String> getEmitterId()
      The emitter's id.
      Returns:
      the id
    • getOptions

      @Input public abstract org.gradle.api.provider.MapProperty<String,String> getOptions()
      The emitter's options.
      Returns:
      the options
    • getEmitterVersion

      @Input public abstract org.gradle.api.provider.Property<String> getEmitterVersion()
      The emitter's version, as the transcriberjEmitters configuration resolves it, for the provenance of the files it writes.
      Returns:
      the version
    • getTranscriberJVersion

      @Input public abstract org.gradle.api.provider.Property<String> 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, for verifyContractSources<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.