-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
99 lines (87 loc) · 2.3 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
buildscript {
ext {
springBootVersion = '1.4.4.RELEASE'
jooqVersion = "3.9.0"
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jooq:jooq-codegen:${jooqVersion}")
classpath("mysql:mysql-connector-java:5.1.36")
}
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
jar {
baseName = 'demo'
version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
/*
task jooq() {
delete "src/generated"
def writer = new StringWriter()
def xml = new groovy.xml.MarkupBuilder(writer)
.configuration('xmlns': 'http://www.jooq.org/xsd/jooq-codegen-3.9.0.xsd') {
jdbc() {
driver('com.mysql.jdbc.Driver')
url('jdbc:mysql://localhost:3306/jooq_test?autoReconnect=true&useFractionalSeconds=true')
user('root')
password('')
}
generator() {
//name('org.jooq.util.JavaGenerator')
database() {
name('org.jooq.util.mysql.MySQLDatabase')
inputSchema('jooq_test')
excludes("schema_version")
}
generate() {
pojos true
daos true
}
target() {
packageName('com.example.db')
directory('src/generated/java')
encoding("UTF-8")
}
}
}
// ----------------------
println writer.toString();
GenerationTool.generate(
JAXB.unmarshal(new StringReader(writer.toString()), org.jooq.util.jaxb.Configuration.class)
)
}*/
dependencies {
compile('org.springframework.boot:spring-boot-starter-actuator')
compile("org.springframework.boot:spring-boot-starter-jdbc")
compile('org.springframework.boot:spring-boot-starter-hateoas')
compile("mysql:mysql-connector-java:5.1.36")
compile group: 'org.hsqldb', name: 'hsqldb', version: '2.3.4'
compile group: 'com.zaxxer', name: 'HikariCP', version: '2.6.0'
compile('org.springframework.boot:spring-boot-starter-data-rest')
compile('org.flywaydb:flyway-core')
compile group: 'org.jooq', name: 'jooq', version: '3.9.1'
testCompile('org.springframework.boot:spring-boot-starter-test')
compile group: 'com.google.guava', name: 'guava', version: '21.0'
compile group: 'joda-time', name: 'joda-time', version: '2.9.7'
}
sourceSets {
main {
java {
srcDirs "src/main/java", "src/generated/java"
}
}
}
clean {
delete("generated")
}