-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
111 lines (99 loc) · 2.6 KB
/
build.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
buildscript {
ext {
springBootVersion = '1.5.2.RELEASE'
}
repositories {
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('org.postgresql:postgresql:9.4.1212')
classpath('nu.studer:gradle-jooq-plugin:2.0.4')
classpath('gradle.plugin.com.boxfuse.client:flyway-release:4.1.2')
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'groovy'
apply plugin: 'nu.studer.jooq'
apply plugin: 'org.flywaydb.flyway'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter')
compile('commons-io:commons-io:2.4')
compileOnly('org.projectlombok:lombok:1.16.14')
compile('org.springframework.boot:spring-boot-starter-jooq')
compile('org.postgresql:postgresql:9.4.1212')
compile('org.flywaydb:flyway-core:4.1.2')
testCompile('org.codehaus.groovy:groovy-all:2.4.7')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.spockframework:spock-core:1.0-groovy-2.4')
}
//Needed, otherwise JOOQ doesn't compile with class not found errors
dependencies {
jooqRuntime 'org.postgresql:postgresql:9.4.1212'
}
bootRepackage {
mainClass = 'com.cryptofiat.aml'
}
jooq {
aml(sourceSets.main) {
jdbc {
driver = 'org.postgresql.Driver'
url = 'jdbc:postgresql://localhost:5432/euro2'
user = 'euro2_aml'
password = 'muhammed123'
schema = 'aml'
}
generator {
name = 'org.jooq.util.DefaultGenerator'
strategy {
name = 'org.jooq.util.DefaultGeneratorStrategy'
}
database {
name = 'org.jooq.util.postgres.PostgresDatabase'
inputSchema = 'aml'
customTypes {
customType {
name = 'com.fasterxml.jackson.databind.JsonNode'
converter = 'csmart.api.config.db.PostgresJSONJacksonJsonNodeBinding'
}
}
forcedTypes {
forcedType {
name = 'com.fasterxml.jackson.databind.JsonNode'
expression = 'public\\.users\\.address'
}
}
}
generate {
relations = true
deprecated = false
records = true
immutablePojos = false
fluentSetters = true
}
target {
packageName = 'com.cryptofiat.aml'
directory = 'src/main/generated/java'
}
}
}
}
flyway {
url = 'jdbc:postgresql://localhost:5432/euro2'
user = 'euro2_aml'
password = 'muhammed123'
schemas = ['aml']
locations = ["filesystem:$project.projectDir/src/main/resources/db/migration"]
}
generateAmlJooqSchemaSource.dependsOn flywayMigrate
test.dependsOn flywayClean