Class TranscriberJSubscription
- All Implemented Interfaces:
org.gradle.api.Named
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
FieldsModifier and TypeFieldDescriptionstatic final StringThe description of a class or field the contract does not describe, when descriptions are generated. -
Constructor Summary
ConstructorsConstructorDescriptionCreates the settings for one contract. -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.provider.Property<String> The package the core classes are generated into.abstract org.gradle.api.provider.Property<String> The base name of aResourceBundlethe generated classes resolve their descriptions through, such asdocs.Descriptions.abstract org.gradle.api.provider.Property<String> The description of a class or field the contract does not describe, whengetGenerateDocs()is on: it says the description is still to come.abstract org.gradle.api.file.RegularFilePropertyThe endpoint index the generation writes: the path of every generated operation and inline schema class, keyedClassName.PATH.abstract org.gradle.api.provider.Property<Boolean> Whether the generated descriptions come from the contract.abstract org.gradle.api.file.DirectoryPropertygetInto()Where the sources are generated.abstract org.gradle.api.file.DirectoryPropertyWhere a resource an emitter writes is generated.getName()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.
-
Field Details
-
DEFAULT_DESCRIPTION_PLACEHOLDER
The description of a class or field the contract does not describe, when descriptions are generated.- See Also:
-
-
Constructor Details
-
TranscriberJSubscription
Creates the settings for one contract.- Parameters:
name- the contract's name
-
-
Method Details
-
getName
The contract's name.- Specified by:
getNamein interfaceorg.gradle.api.Named- Returns:
- the name
-
getBasePackage
The package the core classes are generated into. Required: there is no default.- Returns:
- the base package
-
getSourceSets
The source sets the generated classes are compiled with.Default:
test.- Returns:
- the source set names
-
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
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
The description of a class or field the contract does not describe, whengetGenerateDocs()is on: it says the description is still to come. With it off, every description is the empty string, and this is not used.Default: "INTENTIONALLY LEFT BLANK - WILL BE PROVIDED AT A LATER STAGE".
- Returns:
- the placeholder
-
getDescriptionBundle
The base name of aResourceBundlethe generated classes resolve their descriptions through, such asdocs.Descriptions. The project owns the text; what generation produced -- the contract's description, or the placeholder -- is the fallback for a key the bundle does not carry.Unset by default, and then the generated classes are the ones generated before there were bundles: the text is compiled into them, and nothing is resolved.
-Dapionly.descriptions.bundlenames another bundle for one run, and-Dapionly.descriptions.localethe locale to resolve in, which is what a documentation build rendering several languages from one generated tree uses.- Returns:
- the bundle's base name
-
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, keyedClassName.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
-
getIntoResources
public abstract org.gradle.api.file.DirectoryProperty getIntoResources()Where a resource an emitter writes is generated.Default:
build/generated/resources/transcriberj/<contract>.- Returns:
- the directory
-