forked from mraible/21-points
-
Notifications
You must be signed in to change notification settings - Fork 0
/
liquibase.gradle
31 lines (24 loc) · 907 Bytes
/
liquibase.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
configurations {
liquibase
}
dependencies {
liquibase group: 'org.liquibase.ext', name: 'liquibase-hibernate4', version: liquibase_hibernate4_version
}
task liquibaseDiffChangelog(dependsOn: compileJava, type: JavaExec) {
group = "liquibase"
classpath sourceSets.main.runtimeClasspath
classpath configurations.liquibase
main = "liquibase.integration.commandline.Main"
args "--changeLogFile=src/main/resources/config/liquibase/changelog/" + buildTimestamp() +"_changelog.xml"
args "--referenceUrl=hibernate:spring:org.jhipster.health.domain?dialect=org.hibernate.dialect.PostgreSQL82Dialect"
args "--username=health"
args "--password=health"
args "--url=jdbc:postgresql://localhost/health"
args "--driver=org.postgresql.Driver"
args "diffChangeLog"
}
def buildTimestamp() {
def date = new Date()
def formattedDate = date.format('yyyyMMddHHmmss')
return formattedDate
}