forked from hibobio/hibob-academy-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
87 lines (76 loc) · 2.71 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id("org.flywaydb.flyway") version "10.4.1"
kotlin("jvm") version "1.9.25"
kotlin("plugin.spring") version "1.9.25"
id("org.springframework.boot") version "3.3.3"
id("io.spring.dependency-management") version "1.1.6"
}
buildscript {
dependencies {
classpath("org.flywaydb:flyway-database-postgresql:10.4.1")
}
}
flyway {
url = "jdbc:postgresql://localhost:5432/academy?user=bob&password=dev"
driver = "org.postgresql.Driver"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-jersey")
implementation("org.springframework.boot:spring-boot-starter-logging")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("com.google.guava:guava:33.3.0-jre")
implementation("org.apache.commons:commons-lang3:3.16.0")
implementation("org.apache.httpcomponents:httpclient:4.5.14")
implementation("org.flywaydb:flyway-core")
implementation("org.flywaydb:flyway-database-postgresql")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jooq:jooq:3.17.9")
implementation("org.slf4j:slf4j-api")
//JWT
implementation("io.jsonwebtoken:jjwt-api:0.11.5")
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.11.5")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.11.5")
implementation("org.postgresql:postgresql")
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testImplementation("org.hamcrest:hamcrest-library")
testImplementation("org.mockito.kotlin:mockito-kotlin:5.4.0")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}
tasks {
withType<Test> {
useJUnitPlatform()
testLogging {
displayGranularity = 1
showCauses = true
showStackTraces = true
exceptionFormat = TestExceptionFormat.FULL
events(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
}
reports.junitXml
val dbUrl = System.getenv("DB_URL")
if (dbUrl != null && dbUrl.isNotBlank()) {
systemProperty("DB_URL", dbUrl)
} else {
systemProperty("DB_URL", "jdbc:postgresql://localhost:5432/academy?user=bob&password=dev")
}
systemProperty("spring.profiles.active", "development,test")
}
bootRun {
mainClass.set("com.hibob.AcademyApplicationKt") // Replace with your actual main class
}
}