-
Notifications
You must be signed in to change notification settings - Fork 84
/
build.gradle.kts
104 lines (91 loc) · 3.38 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
group = "io.hexlet"
version = "0.0.1-SNAPSHOT"
description = "Hexlet Typo Reporter"
java.sourceCompatibility = JavaVersion.VERSION_19
plugins {
id("java")
id("maven-publish")
id("io.freefair.lombok") version "8.6"
id("io.spring.dependency-management") version "1.1.4"
id("org.springframework.boot") version "3.0.4"
id("com.github.ben-manes.versions") version "0.51.0"
id("checkstyle")
}
repositories {
mavenLocal()
mavenCentral()
}
dependencyManagement {
imports {
mavenBom("org.testcontainers:testcontainers-bom:1.17.6")
}
}
dependencies {
// Spring
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-validation")
runtimeOnly("org.springframework.boot:spring-boot-devtools")
// Thymeleaf
implementation("org.thymeleaf.extras:thymeleaf-extras-springsecurity6:3.1.1.RELEASE")
implementation("io.github.jpenren:thymeleaf-spring-data-dialect:3.6.0")
implementation("org.webjars:webjars-locator-core:0.58")
implementation("org.webjars:bootstrap:5.2.3")
implementation("nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:3.3.0")
// Database
runtimeOnly("org.postgresql:postgresql:42.5.4")
implementation("io.hypersistence:hypersistence-utils-hibernate-60:3.2.0")
implementation("org.liquibase:liquibase-core:4.26.0")
// Utils
compileOnly("org.projectlombok:lombok-mapstruct-binding:0.2.0")
implementation("org.ocpsoft.prettytime:prettytime:5.0.6.Final")
implementation("org.mapstruct:mapstruct:1.5.3.Final")
// Annotation processors
annotationProcessor("org.mapstruct:mapstruct-processor:1.5.3.Final")
// Testing
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:postgresql")
testImplementation("com.github.database-rider:rider-spring:1.36.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testAnnotationProcessor("org.mapstruct:mapstruct-processor:1.5.3.Final")
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.compilerArgs.add("-Amapstruct.defaultComponentModel=spring")
}
tasks.withType<Javadoc> {
options.encoding = "UTF-8"
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.create("unitTest", type = Test::class) {
filter {
includeTestsMatching("${project.group}.${rootProject.name}.domain.*")
includeTestsMatching("${project.group}.${rootProject.name}.repository.*")
includeTestsMatching("${project.group}.${rootProject.name}.service.*")
}
}
tasks.create("integrationTest", type = Test::class) {
filter {
includeTestsMatching("${project.group}.${rootProject.name}.web.*")
}
}
tasks {
register("stage") {
dependsOn("bootJar", "clean")
}
named("bootJar") {
mustRunAfter("clean")
}
}