-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
78 lines (64 loc) · 2.32 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// The Beverage Buddy sample project ported to Kotlin.
// Original project: https://github.com/vaadin/beverage-starter-flow
plugins {
kotlin("jvm") version "2.1.10"
application
alias(libs.plugins.vaadin)
}
defaultTasks("clean", "build")
repositories {
mavenCentral()
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
// to see the exception stacktraces of failed tests in the CI console
exceptionFormat = TestExceptionFormat.FULL
}
}
dependencies {
// Vaadin
implementation(libs.vaadin.core) {
if (vaadin.effective.productionMode.get()) {
exclude(module = "vaadin-dev")
}
}
implementation(libs.karibu.dsl)
implementation(libs.vaadin.boot)
implementation(libs.hikaricp)
// logging
// currently we are logging through the SLF4J API to SLF4J-Simple. See src/main/resources/simplelogger.properties file for the logger configuration
implementation(libs.slf4j.simple)
// db
implementation(libs.flyway)
implementation(libs.h2) // remove this and replace it with a database driver of your choice.
implementation(libs.jooq.jooq)
// uncomment to enable JooqGenerator
// implementation(libs.jooq.meta)
// implementation(libs.jooq.codegen)
// REST
implementation(libs.http4k)
// workaround for https://github.com/google/gson/issues/1059
implementation(libs.gson.javatime)
// testing
testImplementation(libs.karibu.testing)
testImplementation(libs.junit)
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.withType<KotlinCompile> {
compilerOptions.jvmTarget = JvmTarget.JVM_21 // we use virtual threads: see PipedStreamUtil for more details.
}
java {
sourceCompatibility = JavaVersion.VERSION_21 // we use virtual threads: see PipedStreamUtil for more details.
targetCompatibility = JavaVersion.VERSION_21
// commented out: otherwise the build fails on github actions with jdk 22
// toolchain {
// languageVersion = JavaLanguageVersion.of(21) // we use virtual threads: see PipedStreamUtil for more details.
// }
}
application {
mainClass = "com.vaadin.starter.beveragebuddy.MainKt"
}