-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
93 lines (83 loc) · 3.41 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
plugins {
id("java")
id("pg-index-health-demo.java-compilation")
id("pg-index-health-demo.java-conventions")
id("pg-index-health-demo.forbidden-apis")
id("pg-index-health-demo.pitest")
alias(libs.plugins.spring.boot.v3)
id("com.google.osdetector") version "1.7.3"
}
dependencies {
implementation(project(":db-migrations"))
implementation(platform(libs.spring.boot.v3.dependencies))
implementation(platform("org.apache.httpcomponents.client5:httpclient5-parent:5.4.2"))
implementation(platform("org.springdoc:springdoc-openapi:2.8.5"))
implementation("org.apache.commons:commons-lang3:3.17.0")
implementation("io.micrometer:micrometer-registry-prometheus")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui")
implementation("org.liquibase:liquibase-core:4.31.1")
implementation("org.testcontainers:testcontainers")
implementation("org.testcontainers:postgresql")
implementation("io.github.mfvanek:pg-index-health")
implementation("io.github.mfvanek:pg-index-health-logger")
implementation("io.github.mfvanek:pg-index-health-generator")
implementation("com.github.blagerweij:liquibase-sessionlock:1.6.9")
annotationProcessor(platform(libs.spring.boot.v3.dependencies))
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.springframework.boot:spring-boot-starter-webflux")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("io.github.mfvanek:pg-index-health-test-starter")
testImplementation("org.apache.httpcomponents.client5:httpclient5")
// https://github.com/netty/netty/issues/11020
if (osdetector.arch == "aarch_64") {
testImplementation("io.netty:netty-all:4.1.118.Final")
}
}
tasks {
withType<JacocoReport> {
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.map {
fileTree(it) {
exclude("**/PgIndexHealthSpringBootDemoApplication.class")
}
}))
}
}
jacocoTestCoverageVerification {
violationRules {
classDirectories.setFrom(jacocoTestReport.get().classDirectories)
rule {
limit {
counter = "INSTRUCTION"
value = "COVEREDRATIO"
minimum = "0.97".toBigDecimal()
}
}
rule {
limit {
counter = "BRANCH"
value = "COVEREDRATIO"
minimum = "1.00".toBigDecimal()
}
}
}
}
}
springBoot {
buildInfo()
}
pitest {
excludedClasses.set(
listOf(
"io.github.mfvanek.pg.index.health.demo.config.*",
"io.github.mfvanek.pg.index.health.demo.PgIndexHealthSpringBootDemoApplication"
)
)
excludedTestClasses.set(listOf("io.github.mfvanek.pg.index.health.demo.ActuatorEndpointTest"))
}