-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuild.gradle
More file actions
102 lines (83 loc) · 2.9 KB
/
build.gradle
File metadata and controls
102 lines (83 loc) · 2.9 KB
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
import io.deephaven.csv.Constants
plugins {
id 'io.deephaven.csv.entry'
id 'me.champeau.jmh' version '0.7.3'
}
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 testRuntimeOnly
jmhTestRuntimeOnly.extendsFrom jmh
}
def customDoubleParser = project.findProperty('customDoubleParser') ?: 'fast-double-parser'
dependencies {
compileOnly libs.jetbrains.annotations
annotationProcessor libs.immutables.value
compileOnly libs.immutables.value.annotations
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 libs.trove4j
testImplementation libs.commons.io
testCompileOnly libs.jetbrains.annotations
testImplementation libs.assertj
testImplementation(platform(libs.junit.bom))
testImplementation libs.junit.jupiter
testRuntimeOnly libs.junit.jupiter.engine
testRuntimeOnly libs.junit.platform.launcher
jmh libs.jackson.dataformat.csv
jmh libs.opencsv
jmh libs.univocity.parsers
jmh libs.fastcsv
jmh libs.super.csv
jmh libs.commons.csv
jmh libs.simpleflatemapper.csv
}
jmh {
jmhVersion = libs.versions.jmh
// -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 = 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)
maxHeapSize = "4G"
}
apply plugin: 'io.deephaven.csv.java-publishing-conventions'