-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
130 lines (106 loc) · 3.37 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import java.nio.charset.StandardCharsets
import java.util.*
plugins {
java
id("io.freefair.lombok") version "8.4"
id("org.springframework.boot") version "3.2.1"
id("com.gorylenko.gradle-git-properties") version "2.4.2"
jacoco
id("org.sonarqube") version "6.0.1.5171"
id("io.spring.dependency-management") version "1.1.6"
}
group = "net.ripe.rpki"
version = "0.20.1-SNAPSHOT"
repositories {
mavenCentral()
maven {
url = uri("https://nexus.ripe.net/nexus/content/repositories/releases/")
}
}
gitProperties {
failOnNoGitDirectory = false
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-quartz")
implementation("org.springframework.boot:spring-boot-starter-web")
// for WebClient
implementation("org.springframework.boot:spring-boot-starter-webflux")
developmentOnly("org.springframework.boot:spring-boot-devtools")
implementation("net.ripe.rpki:rpki-commons:1.39.1")
implementation("io.micrometer:micrometer-observation")
implementation("io.micrometer:micrometer-registry-otlp")
implementation("io.micrometer:micrometer-tracing-bridge-otel")
implementation("io.opentelemetry:opentelemetry-exporter-otlp")
// Metrics
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("io.micrometer:micrometer-registry-prometheus")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude("org.junit.vintage", "junit-vintage-engine")
}
testImplementation("org.assertj:assertj-core:3.27.3")
testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0")
}
java {
sourceCompatibility = JavaVersion.VERSION_21
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
options.compilerArgs.addAll(listOf(
"--enable-preview",
"-Xlint:all",
"-Xlint:-processing",
"-Xlint:-serial",
"-Xlint:-preview",
"-Werror"
))
}
tasks.withType<JavaExec>() {
jvmArgs("--enable-preview")
}
sourceSets {
create("integration") {
java.srcDir("src/integration/java")
resources.srcDir("src/integration/resources")
compileClasspath += sourceSets["main"].output + sourceSets["test"].output
runtimeClasspath += sourceSets["main"].output + sourceSets["test"].output
}
}
configurations {
val integrationImplementation by getting {
extendsFrom(testImplementation.get())
}
val integrationRuntimeOnly by getting {
extendsFrom(testRuntimeOnly.get())
}
}
tasks.withType<Test> {
jvmArgs("--enable-preview")
useJUnitPlatform()
maxParallelForks = Math.min(1, Runtime.getRuntime().availableProcessors() / 2)
finalizedBy(tasks.jacocoTestReport)
maxHeapSize = "4g"
}
tasks.register<Test> ("integrationTest") {
description = "Run system integration tests. Requires network access.";
group = "verification"
testClassesDirs = sourceSets["integration"].output.classesDirs
classpath = sourceSets["integration"].runtimeClasspath
mustRunAfter(tasks.test)
}
tasks.named("check") {
dependsOn(tasks.named("integrationTest"))
}
tasks.sonarqube {
dependsOn(tasks.test)
}
jacoco {
toolVersion = "0.8.12"
}
tasks.jacocoTestReport {
reports {
xml.required = true
}
}