Package com.arc_e_tect.gradle.gherkin
Class GherkinToAsciidocExtension
java.lang.Object
com.arc_e_tect.gradle.gherkin.GherkinToAsciidocExtension
DSL extension for the Gherkin-to-AsciiDoc Gradle plugin.
gherkinToAsciidoc {
sourceDir = layout.projectDirectory.dir('src/test/resources/features') // default
includeSubDirs = false // default
outputDir = layout.buildDirectory.dir('generated-docs') // default
outputFileName = 'features.adoc' // default
trackProgress = false // default
// glueCodeDir = layout.projectDirectory.dir('src/test/java/.../steps') // required when trackProgress = true
}
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFor use by the Gradle-generated concrete subclass. -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.file.DirectoryPropertyDirectory containing the Cucumber-JVM glue code (step definitions) used to determine whether a scenario's steps are implemented.abstract org.gradle.api.provider.Property<Boolean> Whether to recursively scan sub-directories whengetSourceDir()is used.abstract org.gradle.api.file.DirectoryPropertyDirectory where the generated AsciiDoc file will be written.abstract org.gradle.api.provider.Property<String> Name of the generated AsciiDoc file (without path).abstract org.gradle.api.file.DirectoryPropertySource directory that contains the.featurefiles to process.abstract org.gradle.api.file.RegularFilePropertyA single.featurefile to process.abstract org.gradle.api.provider.Property<Boolean> Whether to classify every scenario aslisted,defined, orimplementedand include a progress summary in the generated AsciiDoc.
-
Field Details
-
NAME
Extension DSL block name, i.e. the name used to register the extension with the project.- See Also:
-
DEFAULT_SOURCE_DIR
Default relative path of the source directory containing.featurefiles.- See Also:
-
DEFAULT_OUTPUT_FILE_NAME
Default name of the generated AsciiDoc output file.- See Also:
-
-
Constructor Details
-
GherkinToAsciidocExtension
public GherkinToAsciidocExtension()For use by the Gradle-generated concrete subclass.
-
-
Method Details
-
getSourceDir
public abstract org.gradle.api.file.DirectoryProperty getSourceDir()Source directory that contains the.featurefiles to process. Mutually exclusive withgetSourceFile().- Returns:
- mutable directory property for the feature file source directory
-
getSourceFile
public abstract org.gradle.api.file.RegularFileProperty getSourceFile()A single.featurefile to process. Mutually exclusive withgetSourceDir().- Returns:
- mutable file property for a single feature file
-
getIncludeSubDirs
Whether to recursively scan sub-directories whengetSourceDir()is used. Defaults tofalse. Forced totruewhenevergetTrackProgress()istrue.- Returns:
- mutable boolean property controlling recursive directory scanning
-
getOutputDir
public abstract org.gradle.api.file.DirectoryProperty getOutputDir()Directory where the generated AsciiDoc file will be written. Defaults tobuild/generated-docs.- Returns:
- mutable directory property for the output directory
-
getOutputFileName
Name of the generated AsciiDoc file (without path). Defaults to "features.adoc".- Returns:
- mutable string property for the output file name
-
getTrackProgress
Whether to classify every scenario aslisted,defined, orimplementedand include a progress summary in the generated AsciiDoc. Defaults tofalse.Can only be enabled when
getSourceDir()andgetGlueCodeDir()are both configured; enabling it also impliesgetIncludeSubDirs().- Returns:
- mutable boolean property controlling progress tracking
-
getGlueCodeDir
public abstract org.gradle.api.file.DirectoryProperty getGlueCodeDir()Directory containing the Cucumber-JVM glue code (step definitions) used to determine whether a scenario's steps are implemented. Required whengetTrackProgress()istrue; ignored otherwise.- Returns:
- mutable directory property for the glue code directory
-