forked from neo4j-contrib/neo4j-apoc-procedures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
258 lines (224 loc) · 10.3 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
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.5'
}
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.2.3.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.2.3"
// 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 "https://m2.neo4j.org/content/repositories/snapshots" }
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'
compile 'com.jayway.jsonpath:json-path:2.2.0'
compile 'org.hdrhistogram:HdrHistogram:2.1.9'
compile 'org.neo4j.driver:neo4j-java-driver:1.4.4'
compileOnly group: 'net.biville.florent', name: 'neo4j-sproc-compiler', version:'1.2'
compile 'com.novell.ldap:jldap:2009-10-07'
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.apache.derby', name: 'derby', version:'10.12.1.1'
testCompile group: 'org.neo4j', name: 'neo4j-enterprise', version:neo4jVersionEffective
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: 'com.oracle', name: 'ojdbc7', version: '12.1.0.2'
testCompile group: 'org.postgresql', name: 'postgresql', version: '42.1.4'
compileOnly 'org.mongodb:mongodb-driver:3.2.2'
testCompile 'org.mongodb:mongodb-driver:3.2.2'
compileOnly 'com.couchbase.client:java-client:2.3.1'
testCompile 'com.couchbase.client:java-client:2.3.1'
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.0')
compileOnly(group: 'org.ow2.asm', name: 'asm', version:'5.0.2')
compile group: 'com.github.javafaker', name: 'javafaker', version:'0.10'
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
jmh group: 'org.neo4j', name: 'neo4j-lucene-index', version:neo4jVersionEffective
jmh group: 'org.neo4j', name: 'neo4j-kernel', version:neo4jVersionEffective, classifier: "tests"
}
test {
systemProperties 'user.language': 'en', 'user.country': 'US'
testLogging {
events "failed"
exceptionFormat "short"
}
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.2.3.5",
'neo4j-version' : neo4jVersionEffective,
'branch' : "3.2"
}
asciidoctor.doLast {
copy {
from 'build/docs/html5/index.html'
into "build/docs"
rename { String filename -> filename.replace("index","index32") }
}
}
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
// from
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()
}