-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
136 lines (103 loc) · 3.48 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
buildscript {
ext {
springBootVersion = "1.5.6.RELEASE"
// springBootVersion = "2.0.0.M3"
aptVersion="0.12"
lombokVersion="1.16.18"
jodaVersion="2.9.9"
mapstructVersion="1.1.0.Final"
jacksonVersion="2.8.9"
// jacksonVersion="2.9.1"
}
repositories {
mavenCentral()
// Repo for Spring Boot [release-candidates|milestones]
// maven { url "https://repo.spring.io/snapshot" }
// maven { url "https://repo.spring.io/milestone" }
// Repo for gradle-apt-plugin
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
// Spring Boot gradle plugin
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
// gradle-apt-plugin - making it easier/safer to use Java annotation processors
classpath("net.ltgt.gradle:gradle-apt-plugin:${aptVersion}")
}
}
apply plugin: "java"
apply plugin: "eclipse"
// Spring Boot gradle plugin [stable]
apply plugin: "org.springframework.boot"
// Spring Boot gradle plugin [release-candidates|milestones]
// apply plugin: "io.spring.dependency-management"
// gradle-apt-plugin
apply plugin: "net.ltgt.apt"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
jar {
baseName = "rs-mongodbweb"
version = "0.1"
}
compileJava {
// MapSruct specific configs
options.compilerArgs = [
// "-Amapstruct.suppressGeneratorTimestamp=true",
// "-Amapstruct.suppressGeneratorVersionInfoComment=true",
"-Amapstruct.unmappedTargetPolicy=IGNORE",
"-Amapstruct.defaultComponentModel=spring"
]
}
sourceSets {
main {
java {
// Generate MapStruct code into "gensrc/main" folder
delete "${projectDir}/gensrc/main"
output.generatedSourcesDir = "${projectDir}/gensrc/main"
}
}
test {
java {
// Generate MapStruct test code into "gensrc/test" folder
delete "${projectDir}/gensrc/test"
output.generatedSourcesDir = "${projectDir}/gensrc/test"
}
}
}
repositories {
mavenCentral()
// Repo for Spring Boot [release-candidates|milestones]
// maven { url "https://repo.spring.io/snapshot" }
// maven { url "https://repo.spring.io/milestone" }
// Repo for gradle-apt-plugin
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
// Spring DevTools (Boot)
compile("org.springframework.boot:spring-boot-starter")
runtime("org.springframework.boot:spring-boot-devtools")
// Spring Data starter for MongoDB
compile("org.springframework.boot:spring-boot-starter-data-mongodb")
// Spring Data starter for reactive MongoDB
// compile("org.springframework.boot:spring-boot-starter-data-mongodb-reactive")
// Spring REST + HATEOAS
// compile('org.springframework.boot:spring-boot-starter-data-rest')
// Spring Web (including REST + HATEOAS ?)
compile('org.springframework.boot:spring-boot-starter-web')
// Spring Reactive Web
// compile('org.springframework.boot:spring-boot-starter-webflux')
// Lombok
compileOnly("org.projectlombok:lombok:${lombokVersion}")
// Joda time
compile("joda-time:joda-time:${jodaVersion}")
// MapStruct
compile("org.mapstruct:mapstruct-jdk8:${mapstructVersion}")
// FasterXML Jackson
compile("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}")
// gradle-apt-plugin
apt("org.projectlombok:lombok:${lombokVersion}")
apt("org.mapstruct:mapstruct-processor:${mapstructVersion}")
// Testing
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("org.mapstruct:mapstruct-jdk8:${mapstructVersion}")
testCompileOnly("org.projectlombok:lombok:${lombokVersion}")
}