Class TranscriberJSubscription

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

public abstract class TranscriberJSubscription extends Object implements org.gradle.api.Named
How the classes for one subscribed contract are generated.

Its name is the contract's name, exactly as the apiOnlySubscriber block subscribes to it.

  • Nested Class Summary

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The description every generated field carries while descriptions are not generated.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the settings for one contract.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.gradle.api.provider.Property<String>
    The package the core classes are generated into.
    abstract org.gradle.api.provider.Property<String>
    The description every field carries while descriptions are not generated.
    abstract org.gradle.api.file.RegularFileProperty
    The endpoint index the generation writes: the path of every generated operation and inline schema class, keyed ClassName.PATH.
    abstract org.gradle.api.provider.Property<Boolean>
    Whether the generated descriptions come from the contract.
    abstract org.gradle.api.file.DirectoryProperty
    Where the sources are generated.
    The contract's name.
    abstract org.gradle.api.provider.Property<Integer>
    How many times a recursive reference is followed before the rest of a body is documented as a subsection.
    abstract org.gradle.api.provider.ListProperty<String>
    The source sets the generated classes are compiled with.

    Methods inherited from class java.lang.Object

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

    • DEFAULT_DESCRIPTION_PLACEHOLDER

      public static final String DEFAULT_DESCRIPTION_PLACEHOLDER
      The description every generated field carries while descriptions are not generated.
      See Also:
  • Constructor Details

    • TranscriberJSubscription

      @Inject public TranscriberJSubscription(String name)
      Creates the settings for one contract.
      Parameters:
      name - the contract's name
  • Method Details

    • getName

      public String getName()
      The contract's name.
      Specified by:
      getName in interface org.gradle.api.Named
      Returns:
      the name
    • getBasePackage

      public abstract org.gradle.api.provider.Property<String> getBasePackage()
      The package the core classes are generated into. Required: there is no default.
      Returns:
      the base package
    • getSourceSets

      public abstract org.gradle.api.provider.ListProperty<String> getSourceSets()
      The source sets the generated classes are compiled with.

      Default: test.

      Returns:
      the source set names
    • getRecursionDepth

      public abstract org.gradle.api.provider.Property<Integer> getRecursionDepth()
      How many times a recursive reference is followed before the rest of a body is documented as a subsection.

      Default: 3.

      Returns:
      the depth
    • getGenerateDocs

      public abstract org.gradle.api.provider.Property<Boolean> getGenerateDocs()
      Whether the generated descriptions come from the contract. When they do, a class or field the contract does not describe is reported, and documented with the placeholder.

      Default: false. The class tree is for contract testing; documentation is usually generated elsewhere, from text a technical writer owns.

      Returns:
      the setting
    • getDescriptionPlaceholder

      public abstract org.gradle.api.provider.Property<String> getDescriptionPlaceholder()
      The description every field carries while descriptions are not generated.

      Default: "INTENTIONALLY LEFT BLANK - WILL BE PROVIDED AT A LATER STAGE".

      Returns:
      the placeholder
    • getEndpointIndex

      public abstract org.gradle.api.file.RegularFileProperty getEndpointIndex()
      The endpoint index the generation writes: the path of every generated operation and inline schema class, keyed ClassName.PATH. Read-only; it carries the generation task, so a tool reading it runs after the generation.
       doppelgangerApiDetector {
           propertyFiles.from(apiOnlyTranscriberJ.subscriptions.named('orders').flatMap { it.endpointIndex })
       }
       
      Returns:
      the index
    • getInto

      public abstract org.gradle.api.file.DirectoryProperty getInto()
      Where the sources are generated.

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

      Returns:
      the directory