forked from neo4j-contrib/neo4j-apoc-procedures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
351 lines (294 loc) · 14.5 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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
plugins {
id 'java'
id 'idea'
id 'com.github.johnrengelman.shadow' version '2.0.1'
id "org.asciidoctor.convert" version "1.5.3"
id "com.bmuschko.nexus" version "2.3.1"
id "me.champeau.gradle.jmh" version "0.4.4"
id "io.codearte.nexus-staging" version "0.9.0"
}
asciidoctorj {
version = '1.5.6'
}
apply plugin: 'io.codearte.nexus-staging'
sourceCompatibility = 1.8
targetCompatibility = 1.8
idea {
project {
ext.jdkName = '1.8'
ext.languageLevel = '1.8'
}
}
group = 'org.neo4j.procedure'
version = '3.4.0.5'
archivesBaseName = 'apoc'
jar {
manifest {
attributes 'Implementation-Version': version
}
}
description = """neo4j-apoc-procedures"""
ext {
// NB: due to version.json generation by parsing this file, the next line must not have any if/then/else logic
neo4jVersion = "3.4.12"
// instead we apply the override logic here
neo4jVersionEffective = project.hasProperty("neo4jVersionOverride") ? project.getProperty("neo4jVersionOverride") : neo4jVersion
}
repositories {
maven { url "https://m2.neo4j.org/content/repositories/snapshots" }
mavenCentral()
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
flatDir { dirs 'lib' }
}
compileJava {
// type¦qualified name¦signature¦description¦execution mode¦location¦deprecated by
options.compilerArgs += [
"-AIgnoreContextWarnings",
"-AGeneratedDocumentationPath=" + projectDir + "/build/generated-documentation",
"-ADocumentation.FieldDelimiter=¦",
"-ADocumentation.ExportedHeaders=type¦qualified name¦description",
"-ADocumentation.QuotedFields=false",
"-ADocumentation.DelimitedFirstField=true",
"-ADocumentation.ExportGrouping=SINGLE,PACKAGE"]
}
dependencies {
compile group: 'commons-codec', name: 'commons-codec', version: '1.9'
compileOnly group: 'com.sun.mail', name: 'javax.mail', version: '1.6.0'
testCompile group: 'com.sun.mail', name: 'javax.mail', version: '1.6.0'
compile group: 'com.jayway.jsonpath', name: 'json-path', version: '2.2.0'
compile group: 'org.hdrhistogram', name: 'HdrHistogram', version: '2.1.9'
compile group: 'org.neo4j.driver', name: 'neo4j-java-driver', version: '1.6.3'
compileOnly group: 'net.biville.florent', name: 'neo4j-sproc-compiler', version: '1.2'
compile group: 'com.novell.ldap', name: 'jldap', version: '2009-10-07'
compileOnly "org.apache.poi:poi:3.17"
testCompile "org.apache.poi:poi:3.17"
compileOnly "org.apache.poi:poi-ooxml:3.17"
testCompile "org.apache.poi:poi-ooxml:3.17"
compile 'org.jsoup:jsoup:1.11.3'
compile group: 'org.roaringbitmap', name: 'RoaringBitmap', version: '0.7.17'
testCompile 'net.sourceforge.jexcelapi:jxl:2.6.12'
compileOnly group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.270'
testCompile group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.270'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
testCompile group: 'org.neo4j.test', name: 'neo4j-harness', version: neo4jVersionEffective
testCompile group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.2.22.v20170606'
testCompile group: 'org.apache.derby', name: 'derby', version: '10.12.1.1'
testCompile group: 'org.neo4j', name: 'neo4j-enterprise', version: neo4jVersionEffective
testCompile group: 'org.neo4j', name: 'neo4j-common', version: neo4jVersionEffective, classifier: "tests"
testCompile group: 'org.neo4j', name: 'neo4j-com', version: neo4jVersionEffective, classifier: "tests"
testCompile group: 'org.neo4j', name: 'neo4j-causal-clustering', version: neo4jVersionEffective, classifier: "tests"
testCompile group: 'org.neo4j', name: 'neo4j-kernel', version: neo4jVersionEffective, classifier: "tests"
testCompile group: 'org.neo4j', name: 'neo4j-io', version: neo4jVersionEffective, classifier: "tests"
testCompile group: 'org.postgresql', name: 'postgresql', version: '42.1.4'
testCompile group: 'io.minio', name: 'minio', version: '3.0.11'
def withoutServers = {
// exclude group: 'org.mortbay.jetty'
exclude group: 'org.eclipse.jetty'
exclude group: 'org.eclipse.jetty.aggregate'
exclude group: 'com.sun.jersey'
exclude group: 'org.apache.hive', module: 'hive-service'
}
compileOnly group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: '2.7.5', withoutServers
testCompile group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: '2.7.5', withoutServers
compileOnly group: 'org.apache.hadoop', name: 'hadoop-common', version: '2.7.5', withoutServers
testCompile group: 'org.apache.hadoop', name: 'hadoop-common', version: '2.7.5', withoutServers
testCompile group: 'org.apache.hadoop', name: 'hadoop-minicluster', version: '2.7.5', withoutServers
compileOnly 'org.mongodb:mongodb-driver:3.2.2'
testCompile 'org.mongodb:mongodb-driver:3.2.2'
compileOnly group: 'com.couchbase.client', name: 'java-client', version: '2.7.2'
testCompile group: 'com.couchbase.client', name: 'java-client', version: '2.7.2'
// compileOnly 'com.couchbase.client:java-client:2.5.9'
// testCompile 'com.couchbase.client:java-client:2.5.9'
compileOnly group: 'org.neo4j', name: 'neo4j', version: neo4jVersionEffective
compileOnly group: 'org.neo4j', name: 'neo4j-enterprise', version: neo4jVersionEffective
compileOnly group: 'org.codehaus.jackson', name: 'jackson-mapper-asl', version: '1.9.7'
testCompile group: 'org.codehaus.jackson', name: 'jackson-mapper-asl', version: '1.9.7'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.7'
compile group: 'com.opencsv', name: 'opencsv', version: '4.2'
compileOnly group: 'org.ow2.asm', name: 'asm', version: '5.0.2'
compile group: 'com.github.javafaker', name: 'javafaker', version: '0.10'
// schemacrawler
compile group: 'us.fatehi', name: 'schemacrawler', version: '15.04.01'
testCompile group: 'us.fatehi', name: 'schemacrawler-mysql', version: '15.04.01'
testCompile group: 'org.apache.hive', name: 'hive-jdbc', version: '1.2.2', withoutServers
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
compile group: 'org.apache.commons', name: 'commons-text', version: '1.2'
jmh group: 'org.neo4j', name: 'neo4j-lucene-index', version: neo4jVersionEffective
jmh group: 'org.neo4j', name: 'neo4j-kernel', version: neo4jVersionEffective, classifier: "tests"
// Test Containers
testCompile group: 'org.testcontainers', name: 'testcontainers', version: '1.10.2'
testCompile group: 'org.testcontainers', name: 'elasticsearch', version: '1.10.2'
testCompile group: 'org.testcontainers', name: 'couchbase', version: '1.10.2'
testCompile group: 'org.testcontainers', name: 'mysql', version: '1.10.2'
configurations.all {
exclude group: 'org.slf4j', module: 'slf4j-nop'
}
}
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
test {
systemProperties 'user.language': 'en', 'user.country': 'US'
testLogging {
// taken from https://stackoverflow.com/a/36130467/158701
events TestLogEvent.FAILED,
// TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT,
TestLogEvent.STANDARD_ERROR
exceptionFormat TestExceptionFormat.FULL
showExceptions true
showCauses true
showStackTraces true
// set options for log level DEBUG and INFO
debug {
events TestLogEvent.STARTED,
TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_ERROR,
TestLogEvent.STANDARD_OUT
exceptionFormat TestExceptionFormat.FULL
}
info.events = debug.events
info.exceptionFormat = debug.exceptionFormat
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}
}
if (System.env.TRAVIS !=null) {
minHeapSize = "128m"
maxHeapSize = "512m"
}
}
javadoc {
failOnError = false
options.addStringOption('Xdoclint:none', '-quiet')
}
/**************
* ASCIIDOCTOR *
**************/
asciidoctor {
sourceDir = file('docs')
sources { include 'index.adoc' }
outputDir = file('build/docs')
attributes 'apoc-version' : version,
'apoc-release' : "3.4.0.5",
'neo4j-version' : neo4jVersionEffective,
'branch' : "3.4"
}
asciidoctor.doLast {
copy {
from 'build/docs/html5/index.html'
into "build/docs"
rename { String filename -> filename.replace("index","index34") }
}
}
assemble.dependsOn(asciidoctor)
/******
* END *
******/
// publishing
nexusStaging {
packageGroup = "org.neo4j"
stagingProfileId = "acdc2431d20c3d"
//serverUrl = stable release repository - by default Sonatype OSSRH - https://oss.sonatype.org/service/local/
//username = (optional) - username to the server
// password = (optional) - password
//numberOfRetries (optional) - number of retries when waiting for a repository to change a state - by default 7
//delayBetweenRetriesInMillis (optional) - delay between retries - by default 1000 milliseconds
}
modifyPom {
project {
name 'neo4j-apoc-procedures'
packaging 'jar'
description 'A collection of useful Neo4j Procedures'
url 'http://github.com/neo4j-contrib/neo4j-apoc-procedures'
organization {
name "Neo Technology, Inc."
url "http://neotechnology.com"
}
scm {
url 'https://github.com/neo4j-contrib/neo4j-apoc-procedures'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
comments """Note that this license is for the project itself,
and not for its dependencies."""
distribution "repo"
}
}
developers {
developer {
id 'michaelhunger'
name 'Michael Hunger'
email '[email protected]'
}
}
}
}
// tweaks for travis
if (System.env.TRAVIS == 'true') {
allprojects {
tasks.withType(GroovyCompile) {
groovyOptions.fork = false
}
tasks.withType(Test) {
// containers (currently) have 2 dedicated cores and 4GB of memory
maxParallelForks = 2
minHeapSize = '128m'
}
}
}
task copyRuntimeLibs(type: Copy) {
into "lib"
from configurations.testRuntime
}
jmh {
// include = ['some regular expression'] // include pattern (regular expression) for benchmarks to be executed
// exclude = ['some regular expression'] // exclude pattern (regular expression) for benchmarks to be executed
iterations = 5 // Number of measurement iterations to do.
benchmarkMode = ['ss']
// benchmarkMode = ['thrpt','ss'] // Benchmark mode. Available modes are: [Throughput/thrpt, AverageTime/avgt, SampleTime/sample, SingleShotTime/ss, All/all]
// batchSize = 1 // Batch size: number of benchmark method calls per operation. (some benchmark modes can ignore this setting)
fork = 1 // How many times to forks a single benchmark. Use 0 to disable forking altogether
// failOnError = false // Should JMH fail immediately if any benchmark had experienced the unrecoverable error?
// forceGC = false // Should JMH force GC between iterations?
// jvm = 'myjvm' // Custom JVM to use when forking.
// jvmArgs = ['Custom JVM args to use when forking.']
// jvmArgsAppend = ['Custom JVM args to use when forking (append these)']
// jvmArgsPrepend =[ 'Custom JVM args to use when forking (prepend these)']
// humanOutputFile = project.file("${project.buildDir}/reports/jmh/human.txt") // human-readable output file
// resultsFile = project.file("${project.buildDir}/reports/jmh/results.txt") // results file
// operationsPerInvocation = 10 // Operations per invocation.
// benchmarkParameters = [:] // Benchmark parameters.
// profilers = [] // Use profilers to collect additional data. Supported profilers: [cl, comp, gc, stack, perf, perfnorm, perfasm, xperf, xperfasm, hs_cl, hs_comp, hs_gc, hs_rt, hs_thr]
// timeOnIteration = '1s' // Time to spend at each measurement iteration.
// resultFormat = 'CSV' // Result format type (one of CSV, JSON, NONE, SCSV, TEXT)
// synchronizeIterations = false // Synchronize iterations?
// threads = 4 // Number of worker threads to run with.
// threadGroups = [2,3,4] //Override thread group distribution for asymmetric benchmarks.
// timeout = '1s' // Timeout for benchmark iteration.
// timeUnit = 'ms' // Output time unit. Available time units are: [m, s, ms, us, ns].
// verbosity = 'NORMAL' // Verbosity mode. Available modes are: [SILENT, NORMAL, EXTRA]
// warmup = '1s' // Time to spend at each warmup iteration.
// warmupBatchSize = 2 // Warmup batch size: number of benchmark method calls per operation.
warmupForks = 1 // How many warmup forks to make for a single benchmark. 0 to disable warmup forks.
warmupIterations = 1 // Number of warmup iterations to do.
// warmupMode = 'INDI' // Warmup mode for warming up selected benchmarks. Warmup modes are: [INDI, BULK, BULK_INDI].
// warmupBenchmarks = ['.*Warmup'] // Warmup benchmarks to include in the run in addition to already selected. JMH will not measure these benchmarks, but only use them for the warmup.
zip64 = true // Use ZIP64 format for bigger archives
// jmhVersion = '1.15' // Specifies JMH version
// includeTests = true // Allows to include test sources into generate JMH jar, i.e. use it when benchmarks depend on the test classes.
// duplicateClassesStrategy = 'fail' // Strategy to apply when encountring duplicate classes during creation of the fat jar (i.e. while executing jmhJar task)
}
jmhJar {
mergeServiceFiles()
}