Files
sisvietnamvn_01/sisvietnamvn_main/gradle/liquibase.gradle
T
2026-06-25 09:36:05 +07:00

54 lines
2.0 KiB
Groovy

configurations {
liquibaseRuntime.extendsFrom sourceSets.main.compileClasspath
}
dependencies {
implementation "org.liquibase:liquibase-core"
liquibaseRuntime "org.liquibase:liquibase-core"
// Dependency required to parse options. Refer to https://github.com/liquibase/liquibase-gradle-plugin/tree/Release_2.2.0#news.
liquibaseRuntime "info.picocli:picocli:4.7.7"
if (project.hasProperty("prod") || project.hasProperty("gae")) {
liquibaseRuntime "com.oracle.database.jdbc:ojdbc8"
}
liquibaseRuntime "org.liquibase.ext:liquibase-hibernate6:${liquibaseVersion}"
// jhipster-needle-gradle-dependency - JHipster will add additional dependencies here
}
project.ext.diffChangelogFile = "src/main/resources/config/liquibase/changelog/" + new Date().format("yyyyMMddHHmmss") + "_changelog.xml"
if (!project.hasProperty("runList")) {
project.ext.runList = "main"
}
liquibase {
activities {
main {
driver "org.h2.Driver"
url "jdbc:h2:file:./build/h2db/db/sisvietnamvn"
username "sisvietnamvn"
changelogFile "src/main/resources/config/liquibase/master.xml"
logLevel "debug"
classpath "src/main/resources/"
}
diffLog {
driver "org.h2.Driver"
url "jdbc:h2:file:./build/h2db/db/sisvietnamvn"
username "sisvietnamvn"
changelogFile project.ext.diffChangelogFile
referenceUrl "hibernate:spring:com.sisvietnamvn.web.domain?dialect=org.hibernate.dialect.H2Dialect&hibernate.physical_naming_strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.hibernate.SpringImplicitNamingStrategy"
logLevel "debug"
classpath layout.buildDirectory.dir("classes/java/main").get().asFile.absolutePath
}
}
runList = project.ext.runList
}
tasks.named('liquibaseDiff').configure { dependsOn(tasks.named('compileJava')) }
tasks.named('liquibaseDiffChangelog').configure { dependsOn(tasks.named('compileJava')) }
ext {
if (project.hasProperty("no-liquibase")) {
springProfiles += ",no-liquibase"
}
}