-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
104 lines (84 loc) · 3.81 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val springVersion = "3.3.0"
val springDocVersion = "2.5.0"
val testContainersVersion = "1.19.8"
plugins {
id("org.springframework.boot") version "3.3.0"
id("io.spring.dependency-management") version "1.1.5"
kotlin("jvm") version "2.0.0"
kotlin("plugin.spring") version "2.0.0"
jacoco
}
group = "au.kilemon"
// Make sure version matches version defined in MessageQueueApplication
version = "0.3.3"
java.sourceCompatibility = JavaVersion.VERSION_17
repositories {
mavenCentral()
maven {
url = uri("https://jitpack.io")
}
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web:${springVersion}")
implementation("org.springframework.boot:spring-boot-starter-validation:${springVersion}")
implementation("org.springframework.boot:spring-boot-starter-data-redis:${springVersion}")
// JPA dependency
implementation("org.springframework.boot:spring-boot-starter-data-jpa:${springVersion}")
// https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-starter-webmvc-ui
implementation("org.springdoc:springdoc-openapi-starter-webmvc-api:${springDocVersion}")
// https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-starter-webmvc-ui
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:${springDocVersion}")
implementation("com.google.code.gson:gson:2.11.0")
compileOnly("org.projectlombok:lombok:1.18.32")
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-reflect
runtimeOnly("org.jetbrains.kotlin:kotlin-reflect:2.0.0")
// Database drivers
// https://mvnrepository.com/artifact/com.mysql/mysql-connector-j
implementation("com.mysql:mysql-connector-j:8.4.0")
// https://mvnrepository.com/artifact/org.postgresql/postgresql
implementation("org.postgresql:postgresql:42.7.3")
// https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc
implementation("com.microsoft.sqlserver:mssql-jdbc:12.6.3.jre11")
// No SQL drivers
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-mongodb
implementation("org.springframework.boot:spring-boot-starter-data-mongodb:${springVersion}")
// JWT token
// https://mvnrepository.com/artifact/com.auth0/java-jwt
implementation("com.auth0:java-jwt:4.4.0")
/* Test dependencies */
// Need to import this module name as lower case even if the repo is upper case
// https://jitpack.io/#Kilemonn/Mock-All
testImplementation("com.github.Kilemonn:mock-all:0.1.5")
testImplementation("org.springframework.boot:spring-boot-starter-test:${springVersion}")
// Required to mock MultiQueue objects since they apparently override a final 'remove(Object)' method.
testImplementation("org.mockito:mockito-inline:5.2.0")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2")
testImplementation("org.testcontainers:testcontainers:${testContainersVersion}")
testImplementation("org.testcontainers:junit-jupiter:${testContainersVersion}")
testImplementation(kotlin("test"))
}
// If we provide a `com.github.X:Artifact:...-SNAPSHOT` dependency this setting will make sure the snapshot
// Is not cached, so we always get the latest
configurations.all {
resolutionStrategy.cacheChangingModulesFor(0, "seconds")
}
tasks.test {
useJUnitPlatform()
jvmArgs("--add-opens", "java.base/java.util=ALL-UNNAMED",
"--add-opens", "java.base/java.lang=ALL-UNNAMED")
finalizedBy(tasks.jacocoTestReport)
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
jacoco {
toolVersion = "0.8.12"
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // Generate the report after the tests
reports {
xml.required.set(false)
csv.required.set(true)
}
}