-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
79 lines (69 loc) · 3.05 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
plugins {
kotlin("jvm")
kotlin("plugin.jpa")
kotlin("plugin.spring")
id("org.springframework.boot")
id("io.spring.dependency-management")
id("org.jlleitschuh.gradle.ktlint")
}
group = "${property("projectGroup")}"
version = "${property("applicationVersion")}"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
mavenCentral()
}
allOpen {
annotation("jakarta.persistence.Entity")
annotation("jakarta.persistence.MappedSuperclass")
annotation("jakarta.persistence.Embeddable")
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("com.github.f4b6a3:tsid-creator:${property("tsidCreatorVersion")}")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("io.github.oshai:kotlin-logging-jvm:${property("kotlinLoggingVersion")}")
implementation("io.jsonwebtoken:jjwt-api:${property("jjwtVersion")}")
implementation("io.hypersistence:hypersistence-utils-hibernate-63:${property("tsidVersion")}")
implementation("com.linecorp.kotlin-jdsl:jpql-dsl:${property("jdslVersion")}")
implementation("com.linecorp.kotlin-jdsl:jpql-render:${property("jdslVersion")}")
implementation("com.linecorp.kotlin-jdsl:spring-data-jpa-support:${property("jdslVersion")}")
runtimeOnly("com.mysql:mysql-connector-j")
runtimeOnly("io.jsonwebtoken:jjwt-impl:${property("jjwtVersion")}")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:${property("jjwtVersion")}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testImplementation("io.kotest:kotest-runner-junit5-jvm:${property("kotestVersion")}")
testImplementation("io.kotest:kotest-framework-datatest:${property("kotestVersion")}")
testImplementation("io.kotest:kotest-assertions-core:${property("kotestVersion")}")
testImplementation("io.kotest.extensions:kotest-extensions-spring:${property("kotestExtensionsVersion")}")
testImplementation("io.mockk:mockk:${property("mockkVersion")}")
}
kotlin {
compilerOptions {
freeCompilerArgs.addAll("-Xjsr305=strict")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.register<Copy>("addGitHooks") {
from(file("${rootProject.rootDir}/scripts/commit-msg"))
into(file("${rootProject.rootDir}/.git/hooks"))
}
tasks.register<Exec>("installGitHooks") {
commandLine("chmod", "+x", "${project.rootDir}/.git/hooks/commit-msg")
dependsOn("addGitHooks")
}
tasks.register<Exec>("uninstallGitHooks") {
commandLine("rm", "-f", "${project.rootDir}/.git/hooks/commit-msg")
}