-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathbuild.gradle
executable file
·153 lines (139 loc) · 6.35 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
allprojects {
version = '1.0-SNAPSHOT'
}
subprojects {
apply plugin: 'java'
// Make sure transitive project dependencies are resolved
configurations.compile.transitive = true
repositories {
mavenCentral()
jcenter()
}
configurations {
all*.exclude group: "commons-logging", module: "commons-logging"
}
}
//We define versions for the libraries we will be using
ext {
springVersion = '4.2.4.RELEASE'
springJpaVersion = '1.9.2.RELEASE'
springSecurityVersion = '4.0.3.RELEASE'
springBootVersion = '1.4.1.RELEASE'
webflowVersion = '2.4.1.RELEASE'
junitVersion = '4.12'
mockitoVersion = '1.10.19'
slf4jVersion = '1.7.12'
tomcatVersion = '8.0.15'
aspectjVersion = '1.8.4'
jodaVersion = '2.6'
tilesVersion = '3.0.5'
hibernateVersion = '5.0.7.Final'
h2Version = '1.4.184'
logbackVersion = '1.1.3'
thymeleafVersion = '2.1.4.RELEASE'
poiVersion = '3.11'
itextpdfVersion = '5.5.5'
jacksonVersion = '2.5.1'
boot = [
springBootPlugin: "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion",
starterWeb : "org.springframework.boot:spring-boot-starter-web:$springBootVersion",
starterWebSocket: "org.springframework.boot:spring-boot-starter-websocket:$springBootVersion",
starterJetty : "org.springframework.boot:spring-boot-starter-jetty:$springBootVersion",
starterTest : "org.springframework.boot:spring-boot-starter-test:$springBootVersion",
actuator : "org.springframework.boot:spring-boot-starter-actuator:$springBootVersion",
yaml : "org.yaml:snakeyaml:1.16"
]
//we group libraries by their purpose so we can import them easier in the modules
misc = [
h2 : "com.h2database:h2:$h2Version",
slf4jApi : "org.slf4j:slf4j-api:$slf4jVersion",
slf4jJcl : "org.slf4j:jcl-over-slf4j:$slf4jVersion",
logback : "ch.qos.logback:logback-classic:$logbackVersion",
joda : "joda-time:joda-time:$jodaVersion",
junit : "junit:junit:$junitVersion",
mockito : "org.mockito:mockito-all:$mockitoVersion",
hamcrestCore : "org.hamcrest:hamcrest-core:1.3",
hamcrestLib : "org.hamcrest:hamcrest-library:1.3",
dbcp : "org.apache.openejb:commons-dbcp-all:1.3",
jstl : "javax.servlet:jstl:1.2",
tilesJsp : "org.apache.tiles:tiles-jsp:$tilesVersion",
tilesReqApi : "org.apache.tiles:tiles-request-api:1.0.6",
thymeleaf : "org.thymeleaf:thymeleaf:$thymeleafVersion",
thymeleafSpring4 : "org.thymeleaf:thymeleaf-spring4:$thymeleafVersion",
poi : "org.apache.poi:poi:${poiVersion}",
itextpdf : "com.itextpdf:itextpdf:${itextpdfVersion}",
jacksonCore : "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}",
jacksonDatabind : "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}",
jacksonAnnotations: "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}",
xmlapis : "xml-apis:xml-apis:1.4.01"
]
hibernate = [
validator: "org.hibernate:hibernate-validator:5.2.4.Final",
ehcache : "org.hibernate:hibernate-ehcache:$hibernateVersion",
em : "org.hibernate:hibernate-entitymanager:$hibernateVersion",
core : "org.hibernate:hibernate-core:$hibernateVersion",
]
spring = [
data : "org.springframework.data:spring-data-jpa:$springJpaVersion",
test : "org.springframework:spring-test:$springVersion",
webmvc : "org.springframework:spring-webmvc:$springVersion",
webflow : "org.springframework.webflow:spring-webflow:$webflowVersion",
aop : "org.springframework:spring-aop:$springVersion",
jdbc : "org.springframework:spring-jdbc:$springVersion",
orm : "org.springframework:spring-orm:$springVersion",
contextSupport : "org.springframework:spring-context-support:$springVersion",
securityWeb : "org.springframework.security:spring-security-web:$springSecurityVersion",
securityTaglibs: "org.springframework.security:spring-security-taglibs:$springSecurityVersion",
securityConfig : "org.springframework.security:spring-security-config:$springSecurityVersion",
mvcPortlet : "org.springframework:spring-webmvc-portlet:$springVersion",
messaging : "org.springframework:spring-messaging:$springVersion"
]
others = [
portlet : "javax.portlet:portlet-api:2.0",
standard : "taglibs:standard:1.1.2",
httpClient: "commons-httpclient:commons-httpclient:3.1"
]
}
task allDeps {
doLast {
description 'Task used to display dependencies for all modules in the project'
subprojects.each { p ->
println()
println " $p.name ".center(60, '*')
println()
p.configurations.all.findAll { !it.allDependencies.empty }.each { c ->
println " ${c.name} ".center(60, '-')
c.allDependencies.each { dep ->
println "$dep.group:$dep.name:$dep.version"
}
println "-" * 60
}
}
}
}
task allCompile {
doLast {
description 'Task used to compile all modules in the project without running tests'
subprojects.each { p ->
p.getTasksByName("clean", true).each { t ->
println "-> $p.name [CLEAN]"
t.execute();
}
p.getTasksByName("compileJava", true).each { t ->
println "-> $p.name [COMPILE]"
t.execute();
}
p.getTasksByName("classes", true).each { t ->
println "-> $p.name [CLASSES]"
t.execute();
}
p.getTasksByName("jar", true).each { t ->
println "-> $p.name [JAR]"
t.execute();
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.2.1'
}