我将此任务用于liquibase更新:
task liquibaseUpdate(type: JavaExec) {
description 'Liquibase updates DB by all not used changesets'
group = 'Liquibase'
classpath configurations.liquibase
main = 'liquibase.integration.commandline.Main'
if (
project.hasProperty("username") &&
project.hasProperty("password") &&
project.hasProperty("url")
) {
Map<String,?> propertyMap = project.getProperties()
args "--username=${propertyMap['username']}"
args "--password=${propertyMap['password']}"
args "--url=${propertyMap['url']}"
}
args 'update'
}
它从liquibase.properties
文件加载设置。我如何使用自定义属性文件?