Class ValidateChangeLogExtension

java.lang.Object
io.github.htshame.ValidateChangeLogExtension

public abstract class ValidateChangeLogExtension extends Object
DSL extension for the Naming Convention Liquibase Gradle Plugin.

Configure validation in your build.gradle:

validateLiquibaseChangeLog {
    pathToRulesFile = file("src/main/resources/liquibaseNaming/rules.xml")
    changeLogDirectory = file("src/main/resources/db")
}
  • Constructor Details

    • ValidateChangeLogExtension

      public ValidateChangeLogExtension()
      Default constructor.
  • Method Details

    • getPathToRulesFile

      public abstract org.gradle.api.file.RegularFileProperty getPathToRulesFile()
      Path to the XML file with naming-convention rules. Required.
      Returns:
      file property
    • getPathToExclusionsFile

      public abstract org.gradle.api.file.RegularFileProperty getPathToExclusionsFile()
      Path to the XML file with exclusions. Optional.
      Returns:
      file property
    • getChangeLogDirectory

      public abstract org.gradle.api.file.DirectoryProperty getChangeLogDirectory()
      Path to the directory containing Liquibase changeLog files. Required.
      Returns:
      directory property
    • getShouldFailBuild

      public abstract org.gradle.api.provider.Property<Boolean> getShouldFailBuild()
      Whether the build should fail when violations are found.
      Default: true.
      Returns:
      boolean property
    • getChangeLogFormat

      public abstract org.gradle.api.provider.Property<String> getChangeLogFormat()
      Liquibase changeLog file format.
      Supported values: xml, yaml, yml, json.
      Default: xml.
      Returns:
      string property
    • getShouldGenerateExclusions

      public abstract org.gradle.api.provider.Property<Boolean> getShouldGenerateExclusions()
      Whether the contents of the exclusions file should be generated to the log when the build fails.
      Default: false.
      Returns:
      boolean property
    • getRulesFileUrl

      public abstract org.gradle.api.provider.Property<String> getRulesFileUrl()
      Rules file URL. Exactly one of pathToRulesFile or rulesFileUrl must be configured.
      Returns:
      URL string.
    • getExclusionsFileUrl

      public abstract org.gradle.api.provider.Property<String> getExclusionsFileUrl()
      Exclusions file URL. Only one of pathToExclusionsFile or exclusionsFileUrl may be configured.
      Returns:
      URL string.