-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
114 lines (96 loc) · 3.25 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
plugins {
id 'java'
id 'groovy'
id "io.github.reyerizo.gradle.jcstress" version "0.8.13"
id "me.champeau.jmh" version "0.6.6"
id 'jacoco'
}
group 'com.techzealot'
version '1.0.0-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
jcstress {
verbose = true
}
repositories {
mavenLocal()
maven {
url 'https://maven.aliyun.com/repository/public/'
}
mavenCentral()
}
ext {
eclipseCollectionsVersion = '11.1.0'
lombokVersion = '1.18.24'
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-logging', version: '2.7.4'
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
//json
implementation group: 'org.json', name: 'json', version: '20210307'
//eclipse-collections
implementation "org.eclipse.collections:eclipse-collections-api:$eclipseCollectionsVersion"
implementation "org.eclipse.collections:eclipse-collections:$eclipseCollectionsVersion"
//guava
implementation group: 'com.google.guava', name: 'guava', version: '31.1-jre'
implementation group: 'org.jgrapht', name: 'jgrapht-core', version: '1.5.1'
implementation group: 'org.jgrapht', name: 'jgrapht-ext', version: '1.5.1'
implementation group: 'org.jgrapht', name: 'jgrapht-io', version: '1.5.1'
// implementation group: 'io.netty', name: 'netty-all', version: '4.1.9.Final'
//spock support
// mandatory dependencies for using Spock
implementation 'org.codehaus.groovy:groovy:3.0.13'
testImplementation platform("org.spockframework:spock-bom:2.1-groovy-3.0")
testImplementation "org.spockframework:spock-core"
testImplementation "org.spockframework:spock-junit4"
// you can remove this if your code does not rely on old JUnit 4 rules
// optional dependencies for using Spock
// only necessary if Hamcrest matchers are used
testImplementation "org.hamcrest:hamcrest-core:2.2"
// allows mocking of classes (in addition to interfaces)
testRuntimeOnly 'net.bytebuddy:byte-buddy:1.12.16'
// allows mocking of classes without default constructor (together with ByteBuddy or CGLIB)
testRuntimeOnly 'org.objenesis:objenesis:3.2'
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
}
jmh {
warmupIterations = 5
iterations = 5
fork = 1
threads = 8
jvmArgsPrepend = ['--enable-preview']
includes = []
}
//encoding
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
javadoc.options.encoding = 'UTF-8'
//enable preview features
tasks.withType(JavaCompile) {
options.compilerArgs += "--enable-preview"
}
tasks.withType(Test) {
jvmArgs += "--enable-preview"
}
tasks.withType(JavaExec) {
jvmArgs += '--enable-preview'
}
javadoc.options {
addStringOption('Xdoclint:none', "-quiet")
addBooleanOption('-enable-preview', true)
addStringOption('-release', '17')
}