generated from syakuis/spring-gradle-template
/
build.gradle
129 lines (109 loc) · 3.77 KB
/
build.gradle
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
122
123
124
125
126
127
128
129
// https://docs.spring.io/spring-boot/docs/2.4.5/reference/html/dependency-versions.html#dependency-versions
// https://docs.spring.io/spring-boot/docs/2.4.5/reference/htmlsingle
// https://docs.spring.io/spring-cloud/docs/2020.0.3/reference/html/
buildscript {
ext {
groupId = "io.github.syaku"
versionName = "1.0.0-SNAPSHOT"
springBootVersion = "2.4.5"
springCloudVersion = "2020.0.3"
junitVersion = "5.7.1"
jacksonVersion = "2.11.4"
kotlinVersion = "1.6.21"
kotestVersion = "4.6.0"
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE"
classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}"
classpath "org.jetbrains.kotlin:kotlin-noarg:${kotlinVersion}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
classpath "io.kotest:kotest-gradle-plugin:0.3.8"
}
}
wrapper {
gradleVersion = "7.2"
}
apply plugin: "kotlin"
apply plugin: "kotlin-spring"
apply plugin: "kotlin-jpa"
apply plugin: "kotlin-kapt"
apply plugin: "application"
apply plugin: "org.springframework.boot"
apply plugin: "io.spring.dependency-management"
apply plugin: "io.kotest"
allOpen {
annotation("javax.persistence.Entity")
annotation("javax.persistence.MappedSuperclass")
annotation("javax.persistence.Embeddable")
}
repositories {
mavenCentral()
}
group groupId
version versionName
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = JavaVersion.VERSION_17.toString()
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = JavaVersion.VERSION_17.toString()
}
}
compileJava.options.encoding = 'UTF-8'
configurations {
implementation.exclude module: "spring-boot-starter-tomcat"
testImplementation.exclude group: "junit", module: "junit"
}
processResources {
filesMatching('*.yml') {
expand(project.properties)
}
}
dependencies {
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.springframework.boot:spring-boot-starter-undertow"
implementation "org.springframework.boot:spring-boot-starter-webflux"
implementation "org.springframework.boot:spring-boot-starter-websocket"
testImplementation "org.springframework.boot:spring-boot-starter-test"
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-test:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-test-junit5:${kotlinVersion}"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.11.4"
testImplementation "io.kotest.extensions:kotest-extensions-spring:1.0.0"
testImplementation "io.kotest:kotest-runner-junit5-jvm:${kotestVersion}"
testImplementation "io.kotest:kotest-assertions-core-jvm:${kotestVersion}"
testImplementation "io.kotest:kotest-property-jvm:${kotestVersion}"
implementation "org.springframework.boot:spring-boot-starter-amqp"
implementation "org.springframework.amqp:spring-rabbit-test"
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
systemProperty 'spring.profiles.active', 'test'
}
application {
mainClass = "io.github.syaku.redis.ApplicationKt"
}
bootJar {
enabled = true
launchScript()
}
jar {
enabled false
}