-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
118 lines (100 loc) · 3.22 KB
/
build.gradle
File metadata and controls
118 lines (100 loc) · 3.22 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import static java.nio.charset.StandardCharsets.UTF_8
plugins {
id 'java'
alias libs.plugins.publish
id 'jacoco'
id 'jacoco-report-aggregation'
}
group = 'io.github.honhimw'
version = libs.versions.version.get()
description = 'Light-weight, Full-features, Extensible, JRE8+ UUID generators for V1, V3, V4, V5, V6, V7(optional timestamp addition precision).'
def title = 'UUID generators'
repositories {
mavenCentral()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = UTF_8.name()
// inputs.files(tasks.withType(ProcessResources))
options.compilerArgs << '-Werror' << '-Xlint:-options' << '-Xlint:deprecation' << '-Xlint:unchecked'
}
java {
toolchain {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
languageVersion = JavaLanguageVersion.of(25)
}
}
configurations {
testCompileOnly { extendsFrom testAnnotationProcessor }
}
dependencies {
dependencies {
compileOnly libs.jspecify
testImplementation 'io.github.robsonkades:uuidv7:1.0.1'
testImplementation 'com.fasterxml.uuid:java-uuid-generator:5.1.0'
testImplementation 'com.github.f4b6a3:uuid-creator:6.1.1'
testImplementation platform(libs.junit)
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.junit.platform:junit-platform-engine'
testImplementation 'org.junit.platform:junit-platform-launcher'
testImplementation libs.jmh.core
testAnnotationProcessor libs.jmh.generator.annprocess
testAnnotationProcessor libs.lombok
}
}
mavenPublishing {
publishToMavenCentral false
signAllPublications()
coordinates(group as String, name, version as String)
pom {
packaging = 'jar'
name = title
description = project.description
url = 'https://github.com/honhimW/uuid-java'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'honhimw'
name = 'honhimw'
url = 'https://honhimW.github.io'
email = 'honhimw@outlook.com'
}
}
scm {
url = 'https://github.com/honhimW/uuid-java'
connection = 'scm:git:git://github.com/honhimW/uuid-java.git'
developerConnection = 'scm:git:ssh://github.com/honhimW/uuid-java.git'
}
}
}
tasks.named('compileTestJava', JavaCompile) {
sourceCompatibility = '25'
targetCompatibility = '25'
}
test {
useJUnitPlatform()
testLogging {
showStandardStreams = true
showStackTraces = true
exceptionFormat = 'full'
}
finalizedBy jacocoTestReport
}
jacocoTestReport {
reports {
xml.setRequired true
csv.setRequired false
html.setOutputLocation layout.buildDirectory.dir('jacocoHtml')
}
}
tasks.register('bench', JavaExec) {
group = 'benchmark'
mainClass = 'bench.BenchmarkRunner'
classpath = sourceSets.test.runtimeClasspath
}