-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
64 lines (54 loc) · 1.65 KB
/
build.gradle.kts
File metadata and controls
64 lines (54 loc) · 1.65 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
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
plugins {
`java-library`
id("me.champeau.jmh") version "0.7.3"
}
group = "com.dannemann"
version = "1.2.0"
description = "Ultra-fast, zero-allocation string compression library. Up to 50% memory reduction."
repositories {
mavenCentral()
}
dependencies {
// Enables running JMH straight from a main method (fixes "/META-INF/BenchmarkList").
// Useful for debugging (you must set forks to 0 in OptionsBuilder).
// Also, check if the dependency version matches jmhVersion at jmh section below.
jmh("org.openjdk.jmh:jmh-generator-annprocess:1.37")
jmhAnnotationProcessor("org.openjdk.jmh:jmh-generator-annprocess:1.37")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.13.4")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.13.4")
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.build {
doLast {
copy {
from("$rootDir/publishing/java-string-compressor-$version.pom")
into(layout.buildDirectory.dir("libs"))
}
}
}
tasks.javadoc {
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:all,-missing", "-quiet")
}
tasks.test {
useJUnitPlatform()
}
jmh {
jmhVersion = "1.37"
includes = listOf(".Benchmark.")
benchmarkMode = listOf("avgt")
fork = 2
warmup = "10s"
warmupIterations = 3
iterations = 3
timeOnIteration = "10s"
threads = 1
timeUnit = "ms"
resultFormat = "TEXT"
resultsFile = file(
"$projectDir/benchmarks/results-" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss")) + ".txt")
}