forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
561 lines (512 loc) · 22 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
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
/*
* Copyright (c) 2017-2022 TIBCO Software Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You
* may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License. See accompanying
* LICENSE file.
*/
import org.gradle.api.tasks.testing.logging.*
apply plugin: 'wrapper'
// TODO: profiles and allow changing hadoopVersion
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2' }
mavenCentral()
}
dependencies {
classpath 'io.snappydata:gradle-scalatest:0.25'
classpath 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11:0.9.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
classpath 'com.commercehub.gradle.plugin:gradle-avro-plugin:0.8.0'
}
}
description = 'Spark Project'
allprojects {
// We want to see all test results. This is equivalent to setting --continue
// on the command line.
gradle.startParameter.continueOnFailure = true
repositories {
mavenCentral()
maven { url 'https://packages.atlassian.com/maven-3rdparty' }
maven { url 'https://repository.cloudera.com/artifactory/cloudera-repos' }
}
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'idea'
group = 'io.snappydata'
version = '2.1.3.2'
ext {
productName = 'SnappyData'
vendorName = 'TIBCO Software Inc.'
scalaBinaryVersion = '2.11'
scalaVersion = scalaBinaryVersion + '.8'
hadoopVersion = '3.2.0'
protobufVersion = '3.16.1'
jerseyVersion = '2.35'
sunJerseyVersion = '1.19.4'
jettyVersion = '9.4.43.v20210629'
yarnTestJettyVersion = '9.3.24.v20180605' // only used by yarn tests
jettyOldVersion = '6.1.26'
log4j2Version = '2.17.2'
slf4jVersion = '1.7.32'
junitVersion = '4.13.2'
mockitoVersion = '1.10.19'
javaxServletVersion = '3.1.0'
guavaVersion = '14.0.1'
hiveVersion = '1.21.2.7.0.3.2-3'
chillVersion = '0.8.5'
kryoVersion = '4.0.2'
nettyVersion = '4.1.77.Final'
derbyVersion = '10.14.2.0'
httpClientVersion = '4.5.13'
httpCoreVersion = '4.4.10'
levelDbJniVersion = '1.8'
jackson1Version = '1.9.14-atlassian-6'
jacksonVersion = '2.13.3'
jacksonDatabindVersion = '2.13.3'
snappyJavaVersion = '1.1.8.4'
lz4Version = '1.8.0'
lzfVersion = '1.1'
parquetVersion = '1.8.3'
// hiveParquetVersion = '1.6.0'
metricsVersion = '3.2.6'
janinoVersion = '3.0.8'
thriftVersion = '0.9.3'
fb303Version = '0.9.3'
antlrVersion = '4.5.3'
jpamVersion = '1.1'
seleniumVersion = '2.52.0'
curatorVersion = '2.7.1'
commonsCodecVersion = '1.15'
commonsCompressVersion = '1.21'
commonsCryptoVersion = '1.0.0'
commonsLang3Version = '3.8.1'
commonsMath3Version = '3.6.1'
commonsNetVersion = '3.6'
avroVersion = '1.7.7'
avroNewVersion = '1.8.2'
jsr305Version = '3.0.2'
jlineVersion = '2.14.6'
xbeanAsm5Version = '4.5'
breezeVersion = '0.13.2'
pmmlVersion = '1.4.15'
classutilVersion = '1.4.0'
scoptVersion = '3.7.1'
mesosVersion = '1.0.4'
netlibVersion = '1.1.2'
arpackVersion = '0.1'
kafkaVersion = '2.2.2'
scalaLoggingVersion = '3.9.0' // keep consistent with kafkaVersion
joptVersion = '5.0.4'
db2JdbcVersion = '10.5.0.5'
dockerClientVersion = '8.14.5'
mysqlVersion = '8.0.13'
postgresqlVersion = '42.2.5'
ojdbc8Version = '12.2.0.1'
zookeeperVersion = '3.6.2'
activationVersion = '1.1.1'
roaringBitmapVersion = '0.6.66'
json4sVersion = '3.2.11'
streamVersion = '2.9.6'
ivyVersion = '2.4.0'
oroVersion = '2.0.8'
pyroliteVersion = '4.22'
py4jVersion = '0.10.7'
xmlApisVersion = '1.4.01'
datanucleusCoreVersion = '3.2.15'
datanucleusJdoVersion = '3.2.8'
datanucleusRdbmsVersion = '3.2.13'
calciteVersion = '1.4.0-incubating'
jodaTimeVersion = '2.10.1'
joddVersion = '3.9.1'
univocityVersion = '2.7.6'
h2Version = '1.3.176'
jettyJspVersion = '2.2.0.v201112011158'
jettyJstlVersion = '1.2.0.v201105211821'
scalatestVersion = '2.2.6'
scalaCheckVersion = '1.12.6'
junitInterfaceVersion = '0.11'
hamcrestVersion = '1.3'
pegdownVersion = '1.6.0'
shadePackageName = 'org.spark_project'
libraries = [
hadoop_client: dependencies.create("org.apache.hadoop:hadoop-client:${hadoopVersion}") {
exclude(group: 'asm', module: 'asm')
exclude(group: 'org.codehaus.jackson', module: 'jackson-core-asl')
exclude(group: 'org.codehaus.jackson', module: 'jackson-mapper-asl')
exclude(group: 'org.ow2.asm', module: 'asm')
exclude(group: 'org.jboss.netty', module: 'netty')
exclude(group: 'commons-logging', module: 'commons-logging')
exclude(group: 'org.mockito', module: 'mockito-all')
exclude(group: 'org.mortbay.jetty', module: 'servlet-api-2.5')
exclude(group: 'javax.servlet', module: 'servlet-api')
exclude(group: 'junit', module: 'junit')
exclude(group: 'com.google.guava', module: 'guava')
exclude(group: 'com.sun.jersey')
exclude(group: 'com.sun.jersey.jersey-test-framework')
exclude(group: 'com.sun.jersey.contribs')
exclude(group: 'io.netty', module: 'netty')
exclude(group: 'io.netty', module: 'netty-all')
exclude(group: 'org.apache.directory.server', module: 'apacheds-kerberos-codec')
exclude(group: 'log4j', module: 'log4j')
exclude(group: 'org.slf4j', module: 'slf4j-logj12')
},
hive_exec: dependencies.create("org.spark-project.hive:hive-exec:${hiveVersion}") {
exclude(group: 'org.datanucleus', module: 'datanucleus-core')
exclude(group: 'org.spark-project.hive', module: 'hive-metastore')
exclude(group: 'org.spark-project.hive', module: 'hive-shims')
exclude(group: 'org.spark-project.hive', module: 'hive-ant')
exclude(group: 'org.spark-project.hive', module: 'spark-client')
exclude(group: 'org.apache.ant', module: 'ant')
exclude(group: 'com.esotericsoftware.kryo', module: 'kryo')
exclude(group: 'commons-codec', module: 'commons-codec')
exclude(group: 'org.apache.commons', module: 'commons-compress')
exclude(group: 'commons-httpclient', module: 'commons-httpclient')
exclude(group: 'org.apache.avro', module: 'avro')
exclude(group: 'org.apache.avro', module: 'avro-mapred')
exclude(group: 'org.apache.calcite', module: 'calcite-core')
exclude(group: 'org.apache.curator', module: 'apache-curator')
exclude(group: 'org.apache.curator', module: 'curator-client')
exclude(group: 'org.apache.curator', module: 'curator-framework')
exclude(group: 'org.apache.thrift', module: 'libthrift')
exclude(group: 'org.apache.thrift', module: 'libfb303')
exclude(group: 'org.apache.zookeeper', module: 'zookeeper')
exclude(group: 'org.slf4j', module: 'slf4j-api')
exclude(group: 'org.slf4j', module: 'slf4j-log4j12')
exclude(group: 'log4j', module: 'log4j')
exclude(group: 'log4j', module: 'apache-log4j-extras')
exclude(group: 'commons-logging', module: 'commons-logging')
exclude(group: 'org.codehaus.groovy', module: 'groovy-all')
exclude(group: 'jline', module: 'jline')
exclude(group: 'org.json', module: 'json')
},
hive_meta: dependencies.create("org.spark-project.hive:hive-metastore:${hiveVersion}") {
exclude(group: 'org.datanucleus', module: 'datanucleus-core')
exclude(group: 'org.datanucleus', module: 'datanucleus-api-jdo')
exclude(group: 'org.datanucleus', module: 'datanucleus-rdbms')
exclude(group: 'org.spark-project.hive', module: 'hive-serde')
exclude(group: 'org.spark-project.hive', module: 'hive-shims')
exclude(group: 'org.apache.thrift', module: 'libfb303')
exclude(group: 'org.apache.thrift', module: 'libthrift')
exclude(group: 'javax.servlet', module: 'servlet-api')
exclude(group: 'com.google.guava', module: 'guava')
exclude(group: 'org.slf4j', module: 'slf4j-api')
exclude(group: 'org.slf4j', module: 'slf4j-log4j12')
exclude(group: 'log4j', module: 'log4j')
exclude(group: 'log4j', module: 'apache-log4j-extras')
exclude(group: 'org.apache.derby', module: 'derby')
},
avro_ipc: dependencies.create("org.apache.avro:avro-ipc:${avroVersion}") {
exclude(group: 'io.netty', module: 'netty')
exclude(group: 'org.mortbay.jetty', module: 'jetty')
exclude(group: 'org.mortbay.jetty', module: 'jetty-util')
exclude(group: 'org.mortbay.jetty', module: 'servlet-api')
exclude(group: 'org.apache.velocity', module: 'velocity')
exclude(group: 'log4j', module: 'log4j')
exclude(group: 'org.slf4j', module: 'slf4j-log4j12')
},
avro_mapred: dependencies.create("org.apache.avro:avro-mapred:${avroVersion}:hadoop2") {
exclude(group: 'io.netty', module: 'netty')
exclude(group: 'org.mortbay.jetty', module: 'jetty')
exclude(group: 'org.mortbay.jetty', module: 'jetty-util')
exclude(group: 'org.mortbay.jetty', module: 'servlet-api')
exclude(group: 'org.apache.velocity', module: 'velocity')
exclude(group: 'org.apache.avro', module: 'avro-ipc')
},
netty_all: dependencies.create("io.netty:netty-all:${nettyVersion}") {
exclude(group: 'io.netty', module: 'netty-codec-dns')
exclude(group: 'io.netty', module: 'netty-codec-haproxy')
exclude(group: 'io.netty', module: 'netty-codec-http')
exclude(group: 'io.netty', module: 'netty-codec-http2')
exclude(group: 'io.netty', module: 'netty-codec-memcache')
exclude(group: 'io.netty', module: 'netty-codec-mqtt')
exclude(group: 'io.netty', module: 'netty-codec-redis')
exclude(group: 'io.netty', module: 'netty-codec-smtp')
exclude(group: 'io.netty', module: 'netty-codec-socks')
exclude(group: 'io.netty', module: 'netty-codec-stomp')
exclude(group: 'io.netty', module: 'netty-codec-xml')
exclude(group: 'io.netty', module: 'netty-handler-proxy')
exclude(group: 'io.netty', module: 'netty-resolver-dns')
exclude(group: 'io.netty', module: 'netty-resolver-dns-classes-macos')
exclude(group: 'io.netty', module: 'netty-resolver-dns-native-macos')
exclude(group: 'io.netty', module: 'netty-transport-rxtx')
exclude(group: 'io.netty', module: 'netty-transport-sctp')
exclude(group: 'io.netty', module: 'netty-transport-udt')
}
]
}
// default output directory like in sbt/maven
buildDir = 'build-artifacts/scala-' + scalaBinaryVersion
ext {
if (rootProject.name == 'snappy-spark') {
subprojectBase = ':'
sparkProjectRoot = ':'
sparkProjectRootDir = project(':').projectDir
testResultsBase = "${rootProject.buildDir}/tests"
gitCmd = "git --git-dir=${rootDir}/.git --work-tree=${rootDir}"
} else {
subprojectBase = ':snappy-spark:'
sparkProjectRoot = ':snappy-spark'
sparkProjectRootDir = project(':snappy-spark').projectDir
testResultsBase = "${rootProject.buildDir}/tests/spark"
gitCmd = "git --git-dir=${project(sparkProjectRoot).projectDir}/.git --work-tree=${project(sparkProjectRoot).projectDir}"
}
snappyProductDir = "${rootProject.buildDir}/snappy"
}
}
// set python2 for pyspark if python3 version is an unsupported one
String sparkPython = System.getenv('PYSPARK_PYTHON')
if (sparkPython == null || sparkPython.isEmpty()) {
sparkPython = 'python'
def checkResult = exec {
ignoreExitValue = true
commandLine 'sh', '-c', 'python --version 2>/dev/null | grep -Eq "( 3\\.[0-7])|( 2\\.)"'
}
if (checkResult.exitValue != 0) {
checkResult = exec {
ignoreExitValue = true
commandLine 'sh', '-c', 'python2 --version >/dev/null 2>&1'
}
if (checkResult.exitValue == 0) {
sparkPython = 'python2'
}
}
}
def getStackTrace(def t) {
java.io.StringWriter sw = new java.io.StringWriter()
java.io.PrintWriter pw = new java.io.PrintWriter(sw)
org.codehaus.groovy.runtime.StackTraceUtils.sanitize(t).printStackTrace(pw)
return sw.toString()
}
task cleanSparkScalaTest { doLast {
def workingDir = "${testResultsBase}/scalatest"
delete workingDir
file(workingDir).mkdirs()
} }
task cleanSparkJUnit { doLast {
def workingDir = "${testResultsBase}/junit"
delete workingDir
file(workingDir).mkdirs()
} }
subprojects {
apply plugin: 'scala'
apply plugin: 'maven-publish'
apply plugin: 'scalaStyle'
int maxWorkers = project.hasProperty('org.gradle.workers.max') ?
project.property('org.gradle.workers.max') as int :
Runtime.getRuntime().availableProcessors()
// apply compiler options
compileJava.options.encoding = 'UTF-8'
compileJava.options.compilerArgs << '-Xlint:all,-serial,-path,-deprecation'
// compileScala.scalaCompileOptions.optimize = true
compileScala.options.encoding = 'UTF-8'
javadoc.options.charSet = 'UTF-8'
scalaStyle {
configLocation = "${sparkProjectRootDir}/scalastyle-config.xml"
inputEncoding = 'UTF-8'
outputEncoding = 'UTF-8'
outputFile = "${buildDir}/scalastyle-output.xml"
includeTestSourceDirectory = false
source = 'src/main/scala'
testSource = 'src/test/scala'
failOnViolation = true
failOnWarning = false
}
configurations {
runtimeJar {
description 'a dependency to include additional jars at runtime'
visible true
}
}
// when invoking from snappydata, below are already defined at top-level
if (rootProject.name == 'snappy-spark') {
task packageSources(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task packageScalaDocs(type: Jar, dependsOn: scaladoc) {
archiveClassifier.set('javadoc')
from scaladoc
}
configurations {
testOutput {
extendsFrom testCompile
description 'a dependency that exposes test artifacts'
}
}
task packageTests(type: Jar, dependsOn: testClasses) {
description 'Assembles a jar archive of test classes.'
from sourceSets.test.output.classesDirs
archiveClassifier.set('tests')
}
artifacts {
testOutput packageTests
}
}
// fix scala+java mix to all use compileScala which use correct dependency order
sourceSets.main.scala.srcDir 'src/main/java'
sourceSets.main.java.srcDirs = []
dependencies {
// This is a dummy dependency that is used along with the shading plug-in
// to create effective poms on publishing (see SPARK-3812).
//compile group: 'org.spark-project.spark', name: 'unused', version: '1.0.0'
compile 'org.scala-lang:scala-library:' + scalaVersion
compile 'org.scala-lang:scala-reflect:' + scalaVersion
compile 'org.apache.logging.log4j:log4j-api:' + log4j2Version
compile 'org.apache.logging.log4j:log4j-core:' + log4j2Version
compile 'org.apache.logging.log4j:log4j-1.2-api:' + log4j2Version
compile 'org.slf4j:slf4j-api:' + slf4jVersion
compile 'org.apache.logging.log4j:log4j-slf4j-impl:' + log4j2Version
testCompile "junit:junit:${junitVersion}"
testCompile "org.scalatest:scalatest_${scalaBinaryVersion}:${scalatestVersion}"
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testCompile "org.scalacheck:scalacheck_${scalaBinaryVersion}:${scalaCheckVersion}"
testCompile "com.novocode:junit-interface:${junitInterfaceVersion}"
testRuntime "org.pegdown:pegdown:${pegdownVersion}"
}
if (rootProject.name == 'snappy-spark') {
task scalaTest(type: Test) {
actions = [ new com.github.maiflai.ScalaTestAction() ]
testLogging.exceptionFormat = TestExceptionFormat.FULL
testLogging.events = TestLogEvent.values() as Set
extensions.add(com.github.maiflai.ScalaTestAction.TAGS, new org.gradle.api.tasks.util.PatternSet())
List<String> suites = []
extensions.add(com.github.maiflai.ScalaTestAction.SUITES, suites)
extensions.add('suite', { String name -> suites.add(name) } )
extensions.add('suites', { String... name -> suites.addAll(name) } )
def result = new StringBuilder()
extensions.add(com.github.maiflai.ScalaTestAction.TESTRESULT, result)
extensions.add('testResult', { String name -> result.setLength(0); result.append(name) })
def output = new StringBuilder()
extensions.add(com.github.maiflai.ScalaTestAction.TESTOUTPUT, output)
extensions.add('testOutput', { String name -> output.setLength(0); output.append(name) })
def errorOutput = new StringBuilder()
extensions.add(com.github.maiflai.ScalaTestAction.TESTERROR, errorOutput)
extensions.add('testError', { String name -> errorOutput.setLength(0); errorOutput.append(name) })
// running a single scala suite
if (rootProject.hasProperty('singleSuite')) {
suite singleSuite
}
}
}
scalaTest {
// top-level default is single process run since scalatest does not
// spawn separate JVMs
maxParallelForks = 1
systemProperties 'test.src.tables': '__not_used__'
workingDir = "${testResultsBase}/scalatest"
// testResult '/dev/tty'
testOutput "${workingDir}/output.txt"
testError "${workingDir}/error.txt"
binResultsDir = file("${workingDir}/binary/${project.name}")
reports.html.destination = file("${workingDir}/html/${project.name}")
reports.junitXml.destination = file(workingDir)
}
test {
jvmArgs '-Xss4096k'
maxParallelForks = maxWorkers
systemProperties 'spark.master.rest.enabled': 'false',
'test.src.tables': 'src'
workingDir = "${testResultsBase}/junit"
binResultsDir = file("${workingDir}/binary/${project.name}")
reports.html.destination = file("${workingDir}/html/${project.name}")
reports.junitXml.destination = file(workingDir)
}
test.dependsOn subprojectBase + 'cleanSparkJUnit'
scalaTest.dependsOn subprojectBase + 'cleanSparkScalaTest'
check.dependsOn scalaTest
if (rootProject.name == 'snappy-spark') {
check.dependsOn "${subprojectBase}snappy-spark-assembly_${scalaBinaryVersion}:sparkProduct"
}
}
// need to do below after graph is ready else it will give an error about
// runtimeClaspath being set after being finalized
gradle.taskGraph.whenReady { graph ->
def allTasks = subprojects.collect { it.tasks }.flatten()
allTasks.each { task ->
if (task instanceof Test) {
def test = (Test)task
test.configure {
onlyIf { ! Boolean.getBoolean('skip.tests') }
jvmArgs '-ea', '-XX:+HeapDumpOnOutOfMemoryError','-XX:+UseConcMarkSweepGC',
'-XX:+UseParNewGC', '-XX:+CMSClassUnloadingEnabled'
minHeapSize '4g'
maxHeapSize '4g'
// disable assertions for hive tests as in Spark's pom.xml because HiveCompatibilitySuite currently fails (SPARK-4814)
if (test.project.name.contains('snappy-spark-hive_')) {
jvmArgs '-da'
maxParallelForks = 1
} else {
jvmArgs '-ea'
}
environment 'SPARK_DIST_CLASSPATH': test.classpath.asPath,
'SPARK_PREPEND_CLASSES': '1',
'SPARK_SCALA_VERSION': scalaBinaryVersion,
'SPARK_TESTING': '1',
'SPARK_LOCAL_IP': 'localhost',
'PYSPARK_PYTHON': sparkPython,
'PYSPARK_DRIVER_PYTHON': sparkPython,
'JAVA_HOME': System.getProperty('java.home')
systemProperties 'log4j.configurationFile': "file:${test.project.projectDir}/src/test/resources/log4j2.properties",
'derby.system.durability': 'test',
'java.awt.headless': 'true',
'java.io.tmpdir': "${rootProject.buildDir}/tmp",
'spark.test.home': snappyProductDir,
'spark.project.home': "${project(sparkProjectRoot).projectDir}",
'spark.testing': '1',
'spark.master.rest.enabled': 'false',
'spark.ui.enabled': 'false',
'spark.ui.showConsoleProgress': 'false',
'spark.unsafe.exceptionOnMemoryLeak': 'true',
'spark.memory.debugFill': 'true'
testLogging.exceptionFormat = 'full'
if (rootProject.name == 'snappy-spark') {
def eol = System.getProperty('line.separator')
beforeTest { desc ->
def now = new Date().format('yyyy-MM-dd HH:mm:ss.SSS Z')
def progress = new File(workingDir, 'progress.txt')
def output = new File(workingDir, 'output.txt')
progress << "$now Starting test $desc.className $desc.name$eol"
output << "${now} STARTING TEST ${desc.className} ${desc.name}${eol}${eol}"
}
onOutput { desc, event ->
def output = new File(workingDir, 'output.txt')
output << event.message
}
afterTest { desc, result ->
def now = new Date().format('yyyy-MM-dd HH:mm:ss.SSS Z')
def progress = new File(workingDir, 'progress.txt')
def output = new File(workingDir, 'output.txt')
progress << "${now} Completed test ${desc.className} ${desc.name} with result: ${result.resultType}${eol}"
output << "${eol}${now} COMPLETED TEST ${desc.className} ${desc.name} with result: ${result.resultType}${eol}${eol}"
result.exceptions.each { t ->
progress << " EXCEPTION: ${getStackTrace(t)}${eol}"
output << "${getStackTrace(t)}${eol}"
}
}
}
}
}
}
}
task generateSources {
dependsOn subprojectBase + 'snappy-spark-core_' + scalaBinaryVersion + ':generateBuildInfo'
dependsOn subprojectBase + 'snappy-spark-catalyst_' + scalaBinaryVersion + ':generateGrammarSource'
}
if (rootProject.name == 'snappy-spark') {
task scalaStyle {
dependsOn subprojects.scalaStyle
}
} else {
scalaStyle.dependsOn subprojects.scalaStyle
}
check.dependsOn subprojects.check