Class ValidateChangeLogExtension
java.lang.Object
io.github.htshame.ValidateChangeLogExtension
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.file.DirectoryPropertyPath to the directory containing Liquibase changeLog files.abstract org.gradle.api.provider.Property<String> Liquibase changeLog file format.abstract org.gradle.api.provider.Property<String> Exclusions file URL.abstract org.gradle.api.file.RegularFilePropertyPath to the XML file with exclusions.abstract org.gradle.api.file.RegularFilePropertyPath to the XML file with naming-convention rules.abstract org.gradle.api.provider.Property<String> Rules file URL.abstract org.gradle.api.provider.Property<Boolean> Whether the build should fail when violations are found.abstract org.gradle.api.provider.Property<Boolean> Whether the contents of the exclusions file should be generated to the log when the build fails.
-
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
Whether the build should fail when violations are found.
Default:true.- Returns:
- boolean property
-
getChangeLogFormat
Liquibase changeLog file format.
Supported values:xml,yaml,yml,json.
Default:xml.- Returns:
- string property
-
getShouldGenerateExclusions
Whether the contents of the exclusions file should be generated to the log when the build fails.
Default:false.- Returns:
- boolean property
-
getRulesFileUrl
Rules file URL. Exactly one ofpathToRulesFileorrulesFileUrlmust be configured.- Returns:
- URL string.
-
getExclusionsFileUrl
Exclusions file URL. Only one ofpathToExclusionsFileorexclusionsFileUrlmay be configured.- Returns:
- URL string.
-