-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
112 lines (95 loc) · 3.04 KB
/
build.gradle.kts
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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
plugins {
id("ru.vyarus.quality").version("5.0.0")
id("java-library")
id("jacoco")
id("maven-publish")
}
val suitesDir = "src/test/resources/suites/"
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
dependencies {
api("com.github.mbi88", "json-assert", "master-SNAPSHOT", dependencyConfiguration = { isChanging = true })
api("com.github.mbi88", "json-validator", "master-SNAPSHOT", dependencyConfiguration = { isChanging = true })
api("com.github.mbi88", "http-request", "master-SNAPSHOT", dependencyConfiguration = { isChanging = true })
api("com.github.mbi88", "date-handler", "master-SNAPSHOT", dependencyConfiguration = { isChanging = true })
api("com.github.mbi88", "data-faker", "master-SNAPSHOT", dependencyConfiguration = { isChanging = true })
api("org.testng:testng:7.10.2")
api("org.json:json:20250107")
api("io.rest-assured:rest-assured:5.5.0")
api("joda-time:joda-time:2.13.1")
implementation("io.jsonwebtoken:jjwt-api:0.12.6")
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.12.6")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.12.6")
implementation("software.amazon.awssdk:ssm:2.30.13")
implementation("ch.qos.logback:logback-classic:1.5.16")
implementation("com.google.guava:guava:33.4.0-jre")
implementation("com.github.wnameless.json:json-flattener:0.17.1")
}
tasks.withType<JavaCompile> {
options.compilerArgs.add("--enable-preview")
}
tasks.withType<JavaExec> {
jvmArgs("--enable-preview")
}
tasks.withType<Javadoc> {
val opts = options as StandardJavadocDocletOptions
opts.addBooleanOption("Xdoclint:none", true)
opts.addBooleanOption("-enable-preview", true)
opts.addStringOption("-release", "21")
}
tasks.test {
jvmArgs("--enable-preview")
useTestNG {
// Add test suites
File(projectDir.absolutePath + "/" + suitesDir)
.walk()
.forEach {
if (it.isFile) {
suites(it)
}
}
testLogging {
events("passed", "skipped", "failed")
exceptionFormat = TestExceptionFormat.FULL
showStandardStreams = true
}
}
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
html.required.set(true)
html.outputLocation.set(layout.buildDirectory.dir("${buildDir}/reports/coverage").get().asFile)
}
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.withType<Javadoc> {
val opts = options as StandardJavadocDocletOptions
opts.addBooleanOption("Xdoclint:none", true)
}
quality {
checkstyleVersion = "10.16.0"
checkstyle = true
pmd = true
codenarc = true
spotbugs = true
}
tasks.check {
dependsOn(tasks.jacocoTestReport)
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "com.mbi"
artifactId = "common-test-utils"
version = "1.0"
from(components["java"])
}
}
}