-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
111 lines (85 loc) · 3.23 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import com.moowork.gradle.node.npm.NpmTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "3.1.4"
id("io.spring.dependency-management") version "1.1.3"
id("com.github.node-gradle.node") version "2.2.2"
kotlin("jvm") version "1.8.22"
kotlin("plugin.spring") version "1.8.22"
kotlin("plugin.jpa") version "1.8.22"
}
group = "com.example"
version = "0.0.1-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
runtimeOnly("com.h2database:h2")
implementation("mysql:mysql-connector-java:8.0.28")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2")
implementation("com.google.zxing:javase:3.5.0")
implementation("com.google.zxing:core:3.5.0")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
//jwt
implementation(group = "io.jsonwebtoken", name = "jjwt-api", version = "0.11.2")
runtimeOnly(group = "io.jsonwebtoken", name = "jjwt-impl", version = "0.11.2")
runtimeOnly(group = "io.jsonwebtoken", name = "jjwt-jackson", version = "0.11.2")
implementation("org.json:json:20090211")
//redis
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("io.github.microutils:kotlin-logging:3.0.5")
implementation("org.springframework.boot:spring-boot-starter-mail")
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")
}
tasks.withType<KotlinCompile> {
dependsOn("copyWebApp")
kotlinOptions {
freeCompilerArgs += "-Xjsr305=strict"
jvmTarget = "17"
}
}
node {
download = true
version = "20.14.0"
npmVersion = "10.7.0"
workDir = file("${project.buildDir}/nodejs")
npmWorkDir = file("${project.buildDir}/npm")
}
tasks.register<NpmTask>("appNpmBuild") {
dependsOn("appNpmInstall")
workingDir = file("${project.projectDir}/src/main/webapp")
args = listOf("run", "build-dev")
}
tasks.register<NpmTask>("appNpmInstall") {
workingDir = file("${project.projectDir}/src/main/webapp")
args = listOf("install", "--legacy-peer-deps")
}
tasks.register<Copy>("copyWebApp") {
dependsOn("appNpmBuild")
from("src/main/webapp/build")
into("build/resources/main/static/.")
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.withType<Jar> {
enabled = true
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
tasks.jar {
enabled = false
}