-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
272 lines (215 loc) · 7.92 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
group "org.polypheny"
def versionMajor = 0
def versionMinor = 3
def versionQualifier = "-SNAPSHOT"
version = versionMajor + "." + versionMinor + versionQualifier
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
// Shadowing; used to make a fat jar (https://github.com/johnrengelman/shadow)
classpath group: "com.github.jengelman.gradle.plugins", name: "shadow", version: "6.1.0"
// Google Protocol Buffers (https://github.com/google/protobuf-gradle-plugin)
classpath group: "com.google.protobuf", name: "protobuf-gradle-plugin", version: "0.8.17"
// Lombok (https://plugins.gradle.org/plugin/io.freefair.lombok)
classpath group: "io.freefair.gradle", name: "lombok-plugin", version: "6.3.0"
}
}
repositories {
mavenCentral()
maven {
url "https://clojars.org/repo/"
}
flatDir {
dirs "libs"
}
}
apply plugin: "java"
apply plugin: "idea"
apply plugin: "io.freefair.lombok"
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "com.google.protobuf"
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
//configurations.all {
// // Check for updates every build
// resolutionStrategy.cacheChangingModulesFor 0, "seconds"
//}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
def protobufVersion = "3.6.1"
def grpcVersion = "1.21.0"
dependencies {
implementation name: "PolySqlParser-1.0"
//implementation name: "voltdbclient-6.6.4"
////// CHRONOS
implementation group: 'org.chronos-eaas', name: 'chronos-agent', version: '2.3.3'
////// JDBC
//runtime files("libs/postgresql-42.0.0.jar")
implementation (group: 'org.polypheny', name: 'polypheny-jdbc-driver', version: '1.5.2'){exclude group: "com.google.protobuf"}
implementation group: "org.mariadb.jdbc", name: "mariadb-java-client", version: "1.8.0"
implementation group: "monetdb", name: "monetdb-jdbc", version: "2.28"
implementation group: "mysql", name: "mysql-connector-java", version: "6.0.6"
////// PROTO
implementation group: "com.google.protobuf", name: "protobuf-java", version: protobufVersion
implementation group: "com.google.protobuf", name: "protobuf-java-util", version: protobufVersion
implementation group: "io.grpc", name: "grpc-all", version: grpcVersion
////// COMMON
implementation group: "commons-io", name: "commons-io", version: "2.6"
implementation group: "org.apache.commons", name: "commons-math3", version: "3.6.1"
implementation group: "com.google.guava", name: "guava", version: "27.1-jre"
///// TPCC
implementation group: "com.vdurmont", name: "emoji-java", version: "4.0.0"
/////// YCSB Top-Level
implementation group: "com.google.collections", name: "google-collections", version: "1.0"
implementation group: "org.jdom", name: "jdom", version: "1.1"
/////// YCSB CORE
implementation group: "org.apache.htrace", name: "htrace-core4", version: "4.1.0-incubating"
implementation group: "org.codehaus.jackson", name: "jackson-mapper-asl", version: "1.9.4"
implementation group: "org.codehaus.jackson", name: "jackson-core-asl", version: "1.9.4"
implementation group: "org.hdrhistogram", name: "HdrHistogram", version: "2.1.4"
/////// YCSB JDBC
implementation group: "org.apache.openjpa", name: "openjpa-jdbc", version: "2.2.1"
implementation group: "org.hsqldb", name: "hsqldb", version: "2.3.3"
////// LOGGING
implementation group: "org.slf4j", name: "slf4j-api", version: "1.7.26"
implementation group: "org.apache.logging.log4j", name: "log4j-slf4j-impl", version: "2.11.2"
implementation group: "org.apache.logging.log4j", name: "log4j-core", version: "2.11.2"
////// CLI PARSING
implementation group: "com.github.rvesse", name: "airline", version: "2.7.0"
////// NETDATA
// Rest
implementation group: "com.squareup.okhttp3", name: "okhttp", version: "3.14.2"
implementation group: "com.mashape.unirest", name: "unirest-java", version: "1.4.9"
implementation group: "org.apache.httpcomponents", name: "httpclient", version: "4.5.9"
////// JSON
implementation group: "com.google.code.gson", name: "gson", version: "2.8.5"
// https://mvnrepository.com/artifact/com.mchange/c3p0
implementation group: "com.mchange", name: "c3p0", version: "0.9.5.4"
// Java EE modules have been removed in Java 11
implementation group: "javax.xml.bind", name: "jaxb-api", version: "2.3.1"
if (JavaVersion.current().isJava9Compatible()) {
// Workaround for @javax.annotation.Generated
// see: https://github.com/grpc/grpc-java/issues/3633
implementation group: "javax.annotation", name: "javax.annotation-api", version: "1.3.2"
}
// --- Test Compile ---
testImplementation group: "junit", name: "junit", version: "4.12"
testImplementation group: "org.testng", name: "testng", version: "6.10"
}
def generatedDirName = "${project.buildDir}/generated"
sourceSets {
main {
java {
srcDirs = ["src/main/java"]
}
proto {
srcDir "${protobuf.generatedFilesBaseDir}/proto/main/grpc"
srcDir "${protobuf.generatedFilesBaseDir}/proto/main/java"
}
resources {
srcDirs = ["src/main/resources"]
}
}
test {
java {
srcDirs = ["src/test/java"]
}
resources {
srcDirs = ["src/test/resources"]
}
}
}
/**
* Protobuf
*/
protobuf {
// Configure the protoc executable
protoc {
artifact = "com.google.protobuf:protoc:$protobufVersion"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
generatedFilesBaseDir = "${generatedDirName}/proto"
}
/**
* JavaDoc
*/
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption("html5", true)
}
// suppress most of the warnings
options.addStringOption("Xdoclint:none", "-quiet")
// Include private fields in JavaDoc
options.memberLevel = JavadocMemberLevel.PRIVATE
options.tags = ["tpccversion"]
exclude "**/com/yahoo/ycsb**"
options.setOutputLevel(JavadocOutputLevel.QUIET)
options.quiet()
}
/**
* JARs
*/
jar {
manifest {
attributes "Manifest-Version": "1.0"
attributes "Copyright": "The Polypheny Project"
attributes 'Group': project.group
attributes 'Name': project.name
attributes 'Version': project.version
attributes "Main-Class": "org.polypheny.client.main.Main"
attributes "Multi-Release": "true"
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier "sources"
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
from javadoc.destinationDir
}
shadowJar {
classifier ''
}
assemble.dependsOn shadowJar
artifacts {
//archives jar // regular jar containing only the compiled source
archives shadowJar // fat jar which additionally contains all dependencies
archives sourcesJar // jar file containing the java doc files
archives javadocJar // jar file containing the source files
}
/**
* IntelliJ
*/
idea {
module {
downloadJavadoc = true
downloadSources = true
inheritOutputDirs = false
outputDir = file("${project.buildDir}/classes")
testOutputDir = file("${project.buildDir}/test-classes")
// If you have additional sourceSets and/or codegen plugins, add all of them
sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/java")
sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/grpc")
excludeDirs += file("input")
excludeDirs += file("output")
excludeDirs += file("storage")
}
}