-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
121 lines (98 loc) · 4.79 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
121 lines (98 loc) · 4.79 KB
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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val springVersion = "4.0.5"
val springDocVersion = "3.0.3"
val testContainersVersion = "2.0.3"
plugins {
id("org.springframework.boot") version "4.0.5"
id("io.spring.dependency-management") version "1.1.7"
kotlin("jvm") version "2.3.10"
kotlin("plugin.spring") version "2.3.10"
jacoco
}
group = "au.kilemon"
// Make sure version matches version defined in MessageQueueApplication
version = "0.5.0"
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}")
// Memcached
// https://mvnrepository.com/artifact/com.googlecode.xmemcached/xmemcached
implementation("com.googlecode.xmemcached:xmemcached:2.4.8")
// 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.13.1")
compileOnly("org.projectlombok:lombok:1.18.38")
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-reflect
runtimeOnly("org.jetbrains.kotlin:kotlin-reflect:2.3.10")
// Database drivers
// https://mvnrepository.com/artifact/com.mysql/mysql-connector-j
implementation("com.mysql:mysql-connector-j:9.3.0")
// https://mvnrepository.com/artifact/org.postgresql/postgresql
implementation("org.postgresql:postgresql:42.7.8")
// https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc
implementation("com.microsoft.sqlserver:mssql-jdbc:13.2.1.jre11")
// https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
implementation("org.xerial:sqlite-jdbc:3.50.1.0")
// DB Dialects (Needed for SQLLite)
// https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-community-dialects
implementation("org.hibernate.orm:hibernate-community-dialects:7.0.8.Final")
// 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.5.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}")
testImplementation("org.springframework.boot:spring-boot-starter-webmvc-test:${springVersion}")
testImplementation("org.springframework.boot:spring-boot-test-autoconfigure:${springVersion}")
testImplementation("org.springframework.boot:spring-boot-starter-data-jpa-test:${springVersion}")
testImplementation("org.springframework.boot:spring-boot-starter-data-mongodb-test:${springVersion}")
// Required to mock MultiQueue objects since they apparently override a final 'remove(Object)' method.
// https://mvnrepository.com/artifact/org.mockito/mockito-core
testImplementation("org.mockito:mockito-core:5.18.0")
testImplementation("org.testcontainers:testcontainers:${testContainersVersion}")
// Update and align version with ${testContainersVersion}
testImplementation("org.testcontainers:junit-jupiter:1.21.4")
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> {
compilerOptions.jvmTarget.set(JvmTarget.JVM_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)
}
}