forked from deephaven/deephaven-csv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
98 lines (79 loc) · 2.97 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
import io.deephaven.csv.Constants
plugins {
id 'io.deephaven.csv.entry'
id 'me.champeau.jmh' version '0.7.2'
}
description = 'The Deephaven High-Performance CSV Parser'
sourceSets {
jmhTest {
compileClasspath += sourceSets.jmh.output
runtimeClasspath += sourceSets.jmh.output
runtimeClasspath += sourceSets.main.output
}
}
configurations {
// Ensure jmhTest picks up the same dependencies as testImplementation / jmh
jmhTestImplementation.extendsFrom testImplementation
jmhTestRuntimeOnly.extendsFrom jmh
}
def customDoubleParser = project.findProperty('customDoubleParser') ?: 'fast-double-parser'
dependencies {
compileOnly 'org.jetbrains:annotations:26.0.1'
annotationProcessor 'org.immutables:value:2.10.1'
compileOnly 'org.immutables:value-annotations:2.10.1'
if (customDoubleParser == 'fast-double-parser') {
// By default, use the fast double parser for tests and JMH
testRuntimeOnly project(':fast-double-parser')
} else if (customDoubleParser == 'none') {
// Use the JDK Double parser for tests and JMH
} else {
throw new IllegalArgumentException('Invalid customDoubleParser: ' + customDoubleParser)
}
testImplementation 'net.sf.trove4j:trove4j:3.0.3'
testImplementation 'commons-io:commons-io:2.17.0'
testCompileOnly 'org.jetbrains:annotations:26.0.1'
testImplementation 'org.assertj:assertj-core:3.26.3'
testImplementation(platform('org.junit:junit-bom:5.11.3'))
testImplementation 'org.junit.jupiter:junit-jupiter'
jmh 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.18.1'
jmh 'com.opencsv:opencsv:5.9'
jmh 'com.univocity:univocity-parsers:2.9.1'
jmh 'de.siegmar:fastcsv:2.2.2'
jmh 'net.sf.supercsv:super-csv:2.4.0'
jmh 'org.apache.commons:commons-csv:1.12.0'
jmh 'org.simpleflatmapper:sfm-csv:8.2.3'
}
jmh {
jmhVersion = '1.37'
// -prof gc
profilers = ['gc']
// -rf JSON
resultFormat = 'JSON'
if (project.hasProperty('jmh.includes')) {
includes = [ project.property('jmh.includes') ]
}
}
def registerJmhTest = version -> {
project.tasks.register("jmhTestOn${version}", Test) { jmhTest ->
jmhTest.description = "Runs the JMH test suite with Java ${version}."
jmhTest.group = 'verification'
jmhTest.testClassesDirs = sourceSets.jmhTest.output.classesDirs
jmhTest.classpath = sourceSets.jmhTest.runtimeClasspath
jmhTest.maxHeapSize = '2g'
jmhTest.javaLauncher.set javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(version)
}
}
}
def jmhTests = Constants.TEST_VERSIONS.collect { v -> registerJmhTest(v) }
tasks.named('check').configure {
dependsOn jmhClasses
dependsOn jmhTests
}
tasks.named('assemble').configure {
dependsOn jmhJar
}
tasks.withType(Test).configureEach {
inputs.property('customDoubleParser', customDoubleParser)
}
apply plugin: 'io.deephaven.csv.java-publishing-conventions'