Class EmitterSpec

java.lang.Object
com.arc_e_tect.gradle.apionly.transcriberj.EmitterSpec
All Implemented Interfaces:
org.gradle.api.Named

public abstract class EmitterSpec extends Object implements org.gradle.api.Named
One emitter's configuration for one subscription: the emitter('<id>') block.
 apiOnlyTranscriberJ {
     subscription('orders') {
         emitter('restdocs') {
             sourceSets = ['testContract', 'testContractWireMock']
             options = [tests: 'true']
         }
     }
 }
 
  • Nested Class Summary

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

    org.gradle.api.Named.Namer
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the block for one emitter.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.gradle.api.file.DirectoryProperty
    Where the emitter's files, which belong on no classpath, are generated.
    abstract org.gradle.api.file.DirectoryProperty
    Where the emitter's Java sources are generated.
    abstract org.gradle.api.file.DirectoryProperty
    Where the emitter's classpath resources are generated.
    The emitter's id.
    abstract org.gradle.api.provider.MapProperty<String,String>
    The emitter's options, passed to it unchanged; what each means is the emitter's README's to say.
    abstract org.gradle.api.provider.ListProperty<String>
    The source sets the emitter's Java sources and classpath resources go to.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EmitterSpec

      @Inject public EmitterSpec(String id)
      Creates the block for one emitter.
      Parameters:
      id - the emitter's id, such as restdocs
  • Method Details

    • getName

      public String getName()
      The emitter's id.
      Specified by:
      getName in interface org.gradle.api.Named
      Returns:
      the id
    • getSourceSets

      public abstract org.gradle.api.provider.ListProperty<String> getSourceSets()
      The source sets the emitter's Java sources and classpath resources go to. Each must be one of the subscription's sourceSets, so that it sees the schema classes.

      Default: the subscription's sourceSets for an emitter that writes Java or resources, and none for one that writes only files. An empty list is allowed only for the latter.

      Returns:
      the source set names
    • getOptions

      public abstract org.gradle.api.provider.MapProperty<String,String> getOptions()
      The emitter's options, passed to it unchanged; what each means is the emitter's README's to say.

      Default: none.

      Returns:
      the options
    • getIntoJava

      public abstract org.gradle.api.file.DirectoryProperty getIntoJava()
      Where the emitter's Java sources are generated.

      Default: build/generated/sources/transcriberj/<contract>/<id>.

      Returns:
      the directory
    • getIntoResources

      public abstract org.gradle.api.file.DirectoryProperty getIntoResources()
      Where the emitter's classpath resources are generated.

      Default: build/generated/resources/transcriberj/<contract>/<id>.

      Returns:
      the directory
    • getIntoFiles

      public abstract org.gradle.api.file.DirectoryProperty getIntoFiles()
      Where the emitter's files, which belong on no classpath, are generated.

      Default: build/generated/files/transcriberj/<contract>/<id>.

      Returns:
      the directory