-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
111 lines (92 loc) · 2.72 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 {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.1.RELEASE")
classpath 'org.flywaydb:flyway-gradle-plugin:4.0.3'
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: "org.flywaydb.flyway"
sourceSets {
generated {
java {
srcDirs = ['src/main/generated']
}
}
}
jar {
baseName = 'gs-spring-boot'
version = '0.1.0'
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
def queryDSL = '3.6.7'
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.boot:spring-boot-starter-data-jpa")
testCompile("org.springframework.boot:spring-boot-starter-test")
compile(
"org.projectlombok:lombok:1.16.6",
'com.google.guava:guava:11.0.2'
)
compile (
"mysql:mysql-connector-java:5.1.31",
"com.zaxxer:HikariCP:2.4.5"
)
compile 'com.github.jknack:handlebars:4.0.6',
'com.github.jknack:handlebars-helpers:4.0.4',
'com.github.jknack:handlebars-jackson2:4.0.4',
'com.github.jknack:handlebars-humanize:4.0.4',
'com.github.jknack:handlebars-markdown:4.0.4',
'com.github.jknack:handlebars-springmvc:4.0.4'
compile(
'org.springframework.data:spring-data-redis',
'redis.clients:jedis',
)
compile "com.querydsl:querydsl-core:4.1.3"
compile "com.querydsl:querydsl-jpa:4.1.3"
compile "com.querydsl:querydsl-sql:4.1.3"
compile "com.querydsl:querydsl-apt:4.1.3"
testCompile("junit:junit")
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
task generateQueryDSL(type: JavaCompile, group: 'build') {
source = sourceSets.main.java
classpath = configurations.compile
options.compilerArgs = [
"-proc:only",
"-processor", "com.querydsl.apt.jpa.JPAAnnotationProcessor"
]
destinationDir = sourceSets.generated.java.srcDirs.iterator().next()
}
compileJava {
dependsOn generateQueryDSL
source generateQueryDSL.destinationDir
}
compileGeneratedJava {
dependsOn generateQueryDSL
options.warnings = false
classpath += sourceSets.main.runtimeClasspath
}
clean {
delete sourceSets.generated.java.srcDirs
}
flyway {
user = 'consultant-admin'
password = 'consultant'
url = 'jdbc:mysql://localhost:3306/consultant?useUnicode=true&charaterEncoding=utf-8'
driver = 'com.mysql.jdbc.Driver'
schemas = ['consultant']
table = 'db_migration_history'
}