-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
106 lines (89 loc) · 3.3 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.api.tasks.JavaExec
plugins {
id("com.github.ben-manes.versions") version "0.48.0"
id("application")
id("checkstyle")
id("jacoco")
id("org.springframework.boot") version "3.2.2"
id("io.spring.dependency-management") version "1.1.4"
id("io.sentry.jvm.gradle") version "4.4.1"
id("io.freefair.lombok") version "8.4"
}
group = "hexlet.code"
version = "0.0.1-SNAPSHOT"
application {
mainClass.set("hexlet.code.AppApplication")
}
java {
sourceCompatibility = JavaVersion.VERSION_21
}
checkstyle {
configFile = file("config/checkstyle/checkstyle.xml")
toolVersion = "10.13.0" // your choice here
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
maven { url = uri("https://repo.spring.io/milestone") }
maven { url = uri("https://repo.spring.io/snapshot") }
}
sentry {
includeSourceContext = true
org = "hexlet-g0"
projectName = "java-spring-boot"
authToken = System.getenv("SENTRY_AUTH_TOKEN")
}
tasks.sentryBundleSourcesJava {
enabled = System.getenv("SENTRY_AUTH_TOKEN") != null
}
dependencies {
annotationProcessor("org.projectlombok:lombok-mapstruct-binding:0.2.0")
implementation("org.mapstruct:mapstruct:1.5.5.Final")
annotationProcessor("org.mapstruct:mapstruct-processor:1.5.5.Final")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.openapitools:jackson-databind-nullable:0.2.6")
developmentOnly("org.springframework.boot:spring-boot-devtools")
runtimeOnly("com.h2database:h2")
runtimeOnly("org.postgresql:postgresql")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
implementation("org.instancio:instancio-junit:3.3.1")
implementation("net.datafaker:datafaker:2.0.2")
testImplementation("net.javacrumbs.json-unit:json-unit-assertj:3.2.2")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-api:2.2.0")
testImplementation("org.springdoc:springdoc-openapi-starter-webmvc-api:2.2.0")
}
tasks.withType<Test>() {
finalizedBy(tasks.jacocoTestReport)
useJUnitPlatform()
testLogging {
exceptionFormat = TestExceptionFormat.FULL
events = mutableSetOf(TestLogEvent.FAILED, TestLogEvent.PASSED, TestLogEvent.SKIPPED)
showStandardStreams = true
}
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
}
}
tasks.register<JavaExec>("runTaskManagerApp") {
classpath = sourceSets.main.get().runtimeClasspath
mainClass.set("hexlet.code.AppApplication")
args("--server.port=8080")
}