forked from spring-petclinic/spring-petclinic-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
73 lines (59 loc) · 2.47 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
description = "Kotlin version of the Spring Petclinic application"
group = "org.springframework.samples"
// Align with Spring Version
version = "3.2.0"
java.sourceCompatibility = JavaVersion.VERSION_17
plugins {
val kotlinVersion = "1.9.20"
id("org.springframework.boot") version "3.2.0"
id("io.spring.dependency-management") version "1.1.4"
id("com.google.cloud.tools.jib") version "3.1.4"
kotlin("jvm") version kotlinVersion
kotlin("plugin.spring") version kotlinVersion
}
// WebJars versions are also referenced in src/main/resources/templates/fragments/layout.html for resource URLs
val boostrapVersion = "5.1.3"
val fontAwesomeVersion = "4.7.0"
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
freeCompilerArgs = listOf("-Xjsr305=strict")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
repositories {
mavenCentral()
maven { url = uri("https://repo.spring.io/snapshot") }
maven { url = uri("https://repo.spring.io/milestone") }
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.glassfish.jaxb:jaxb-runtime")
implementation("javax.cache:cache-api")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.webjars.npm:bootstrap:$boostrapVersion")
implementation("org.webjars.npm:font-awesome:$fontAwesomeVersion")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-starter-webflux")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
runtimeOnly("com.h2database:h2")
runtimeOnly("com.mysql:mysql-connector-j")
developmentOnly("org.springframework.boot:spring-boot-devtools")
implementation(kotlin("stdlib-jdk8"))
}
jib {
to {
image = "springcommunity/spring-petclinic-kotlin"
tags = setOf(project.version.toString(), "latest")
}
}