-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
192 lines (160 loc) · 6.66 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
plugins {
id "com.github.ben-manes.versions" version "0.51.0"
id "net.ltgt.errorprone" version "4.0.1"
id "java"
id "idea"
id "application"
id "com.vanniktech.dependency.graph.generator" version "0.8.0"
id("com.diffplug.spotless") version "6.25.0"
// id "com.libyear.libyear-gradle-plugin" version "0.1.6"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
dependencies {
errorprone("com.google.errorprone:error_prone_core:2.27.1") {
because "errorprone version is different from plugin version"
}
implementation('com.fasterxml.jackson.core:jackson-databind:2.17.2')
implementation("io.reactivex.rxjava3:rxjava:3.1.8")
implementation('io.projectreactor:reactor-core:3.6.9')
implementation("org.threeten:threeten-extra:1.8.0")
implementation("org.slf4j:slf4j-api:2.0.16")
implementation("ch.qos.logback:logback-classic:1.5.6")
implementation("ch.qos.logback:logback-core:1.5.7")
implementation("org.owasp.encoder:encoder:1.2.3")
implementation("com.hazelcast:hazelcast:5.5.0")
implementation("javax.cache:cache-api:1.1.1")
implementation('commons-codec:commons-codec:1.17.1')
implementation("com.google.code.gson:gson:2.11.0")
implementation("org.apache.commons:commons-csv:1.11.0")
implementation('org.apache.commons:commons-lang3:3.14.0')
implementation("org.hibernate:hibernate-core:6.6.0.Final")
implementation("net.ttddyy:datasource-proxy:1.10")
implementation("org.postgresql:postgresql:42.7.3")
implementation("io.lettuce:lettuce-core:6.3.1.RELEASE")
implementation("software.amazon.awssdk:s3:2.28.9")
implementation 'redis.clients:jedis:5.1.3'
implementation("org.eclipse.collections:eclipse-collections-api:11.1.0")
implementation("org.eclipse.collections:eclipse-collections:11.1.0")
implementation("org.apache.commons:commons-pool2:2.12.0")
implementation 'org.dom4j:dom4j:2.1.4'
implementation 'com.google.zxing:core:3.5.3'
implementation 'com.google.zxing:javase:3.5.3'
testImplementation 'com.github.mwiede:jsch:0.2.18'
testImplementation 'com.hierynomus:sshj:0.39.0'
implementation 'io.vavr:vavr:1.0.0-alpha-4'
implementation("javax.servlet:servlet-api:2.5")
// jep 320
implementation("org.glassfish.jaxb:jaxb-runtime:4.0.5")
implementation("org.glassfish.jaxb:jaxb-xjc:4.0.4")
implementation("com.sun.xml.ws:jaxws-rt:4.0.2")
implementation("javax.activation:activation:1.1.1")
def junit4Version = "4.13.2"
def junitVintageVersion = "5.10.3"
def junitJupiterVersion = "5.10.3"
def junitPlatformVersion = "1.10.3"
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${junitJupiterVersion}")
testImplementation("junit:junit:${junit4Version}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
testImplementation("org.junit.platform:junit-platform-suite-engine:${junitPlatformVersion}")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}") {
because "allows JUnit 3 and JUnit 4 tests to run"
}
testRuntimeOnly("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}") {
because "allows tests to run from IDEs that bundle older version of launcher"
}
testImplementation("com.approvaltests:approvaltests:22.3.3")
def mockitoVersion = "5.12.0"
testImplementation("org.mockito:mockito-core:${mockitoVersion}")
testImplementation("org.mockito:mockito-junit-jupiter:${mockitoVersion}")
testImplementation('org.assertj:assertj-core:3.25.3')
testImplementation("pl.pragmatists:JUnitParams:1.1.1")
testImplementation('com.squareup.okhttp3:mockwebserver:4.12.0')
testImplementation("org.awaitility:awaitility-groovy:4.2.2")
testImplementation("com.tngtech.archunit:archunit:1.3.0")
testImplementation("net.datafaker:datafaker:2.3.0")
testImplementation('nl.jqno.equalsverifier:equalsverifier:3.16.2')
testImplementation("org.slf4j:slf4j-simple:2.0.13") {
because "allows a library to log during tests even when only log4j api is on path"
}
def testcontainersVersion = "1.20.1"
testImplementation("org.testcontainers:testcontainers:${testcontainersVersion}")
testImplementation("org.testcontainers:junit-jupiter:${testcontainersVersion}")
testImplementation("org.testcontainers:postgresql:${testcontainersVersion}")
testImplementation("org.testcontainers:localstack:${testcontainersVersion}")
testImplementation "com.redis:testcontainers-redis:2.2.2"
testImplementation("com.larseckart:junit-tcr-extensions:0.0.3")
testImplementation("com.github.kirviq:dumbster:1.7.1")
testImplementation 'org.tonicsoft.timebomb:timebomb-junit:0.0.0'
testImplementation 'com.innoq:junit5-logging-extension:0.2.0'
}
jar {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
}
tasks.register('copyDependenciesToLibs', Copy) {
into "libs"
from configurations.compileClasspath
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
//options.compilerArgs.add("-Xlint:all")
options.compilerArgs += "--enable-preview"
options.incremental = true
dependsOn 'spotlessApply'
options.errorprone {
allErrorsAsWarnings = true
disableWarningsInGeneratedCode = true
allErrorsAsWarnings = true
disableAllChecks = true
}
}
// application and main class definition
application {
mainClassName = 'lars.Main'
}
test {
useJUnitPlatform()
testLogging {
events "SKIPPED", "FAILED"
exceptionFormat "full"
}
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
jvmArgs("--enable-preview")
}
tasks.withType(Test).configureEach {
jvmArgs += "--enable-preview"
}
tasks.withType(JavaExec).configureEach {
jvmArgs += "--enable-preview"
}
dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ["alpha", "beta", "rc", "cr", "m", "preview", "b", "ea"].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]$qualifier[.\d-+]*/
}
if (rejected) {
selection.reject("Release candidate")
}
}
}
}
spotless {
java {
googleJavaFormat()
formatAnnotations()
}
}
//libyear {
// // gw -q dependencies --configuration compileClasspath
// configurations = ['compileClasspath']
// failOnError = false
// validator = allArtifactsCombinedMustNotBeOlderThan(years(100)) // just so that build doesnt fail
//}