-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
189 lines (154 loc) · 4.64 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath 'net.researchgate:gradle-release:2.4.0'
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'war'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'net.researchgate.release'
apply plugin: 'jacoco'
// apply plugin: 'findbugs'
// apply plugin: 'checkstyle'
// apply plugin: 'pmd'
group = 'org.gradle.sample'
// version = '1.0'
version = new ProjectVersion(0,7,System.env.BUILD_NUMBER)
//versionFlat = new ProjectVersion(0,7,"")
repositories {
jcenter()
}
configurations {
mainClassName = ''
}
ext {
logbackVersion="1.1.3"
slf4jVersion = "1.7.21"
junitVersion = "4.12"
restletVersion = "2.3.3"
beanUtilsVersion = "1.9.2"
configurationVersion = "1.10"
}
}
project(':ins_common') {
dependencies {
compile "commons-lang:commons-lang:2.6"
compile "commons-io:commons-io:2.4"
compile "commons-configuration:commons-configuration:${configurationVersion}"
compile "com.fasterxml.jackson.core:jackson-databind:2.4.4"
compile "org.slf4j:slf4j-api:${slf4jVersion}"
compile "ch.qos.logback:logback-classic:${logbackVersion}"
compile "ch.qos.logback:logback-core:${logbackVersion}"
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
testCompile "junit:junit:${junitVersion}"
}
jacocoTestReport {
reports {
xml.enabled = false
html.enabled = true
}
}
check.dependsOn jacocoTestReport
}
project(':ins_db') {
dependencies {
compile project(':ins_common')
compile "redis.clients:jedis:2.9.0"
compile "commons-validator:commons-validator:1.4.1"
testCompile "junit:junit:${junitVersion}"
}
jacocoTestReport {
reports {
xml.enabled = false
html.enabled = true
}
}
check.dependsOn jacocoTestReport
}
project(':ins_webapp') {
//Used for deployment - do not change the name!
war.version=''
war.baseName='InserProxy_WebApplication'
war {
rootSpec.exclude("**/slf4j-simple-1.7.12.jar")
}
configurations {
mainClassName = 'org.scg.webapp.run.WebappDriver'
}
dependencies {
compile project(':ins_common')
compile project(':ins_db')
compile "org.ocpsoft.prettytime:prettytime:3.2.7.Final"
compile 'com.sparkjava:spark-core:2.3'
compile 'com.sparkjava:spark-template-mustache:1.0.0'
compile "commons-beanutils:commons-beanutils:${beanUtilsVersion}"
testCompile "junit:junit:${junitVersion}"
}
jacocoTestReport {
reports {
xml.enabled = false
html.enabled = true
}
}
check.dependsOn jacocoTestReport
}
project(':ins_websockets') {
//Used for deployment - do not change the name!
war.version=''
war.baseName='InserProxy_WebSockets'
jar {
archivesBaseName = 'TOC_WEBSOCKETS_SERVICE'
//version = sdkjarVersion
group = 'example'
include 'org/scg/**'
manifest {
attributes 'Implementation-Title': 'WebSocketsService', 'Implementation-Version': version, 'Main-Class': 'org.scg.websockets.run.WebsocketsDriver'
}
}
configurations {
mainClassName = 'org.scg.websockets.run.WebsocketsDriver'
}
dependencies {
compile project(':ins_common')
compile project(':ins_db')
compile 'org.eclipse.jetty:jetty-server:9.3.9.M1'
compile 'org.eclipse.jetty:jetty-servlet:9.3.9.M1'
compile 'org.eclipse.jetty.websocket:websocket-client:9.3.9.M1'
compile 'org.eclipse.jetty.websocket:websocket-servlet:9.3.9.M1'
compile 'org.eclipse.jetty.websocket:websocket-server:9.3.9.M1'
compile "org.nanohttpd:nanohttpd:2.2.0"
compile "commons-beanutils:commons-beanutils:${beanUtilsVersion}"
testCompile "junit:junit:${junitVersion}"
}
jacocoTestReport {
reports {
xml.enabled = false
html.enabled = true
}
}
check.dependsOn jacocoTestReport
}
class ProjectVersion {
Integer major
Integer minor
String build
ProjectVersion(Integer major, Integer minor, String build) {
this.major = major
this.minor = minor
this.build = build
}
@Override
String toString() {
String fullVersion = "$major.$minor"
if(build) {
fullVersion += ".$build"
}
fullVersion
}
}