Class GherkinToAsciidocExtension

java.lang.Object
com.arc_e_tect.gradle.gherkin.GherkinToAsciidocExtension

public abstract class GherkinToAsciidocExtension extends Object
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
 }
 
  • Field Details

    • NAME

      public static final String NAME
      Extension DSL block name, i.e. the name used to register the extension with the project.
      See Also:
    • DEFAULT_SOURCE_DIR

      public static final String DEFAULT_SOURCE_DIR
      Default relative path of the source directory containing .feature files.
      See Also:
    • DEFAULT_OUTPUT_FILE_NAME

      public static final String 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 .feature files to process. Mutually exclusive with getSourceFile().
      Returns:
      mutable directory property for the feature file source directory
    • getSourceFile

      public abstract org.gradle.api.file.RegularFileProperty getSourceFile()
      A single .feature file to process. Mutually exclusive with getSourceDir().
      Returns:
      mutable file property for a single feature file
    • getIncludeSubDirs

      public abstract org.gradle.api.provider.Property<Boolean> getIncludeSubDirs()
      Whether to recursively scan sub-directories when getSourceDir() is used. Defaults to false.
      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 to build/generated-docs.
      Returns:
      mutable directory property for the output directory
    • getOutputFileName

      public abstract org.gradle.api.provider.Property<String> getOutputFileName()
      Name of the generated AsciiDoc file (without path). Defaults to "features.adoc".
      Returns:
      mutable string property for the output file name