-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
114 lines (97 loc) · 3.28 KB
/
Copy pathbuild.gradle
File metadata and controls
114 lines (97 loc) · 3.28 KB
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
plugins {
id 'org.springframework.boot' version '3.5.6'
id 'io.spring.dependency-management' version '1.1.7'
id 'java'
id 'jacoco'
}
group = 'hu.performance'
version = '0.1.0-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
dependencies {
//implementation platform('org.springframework.boot:spring-boot-dependencies:3.4.4')
// --- Spring starters ---
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
//fontos: 2.7.x vagy frissebb kell Spring 6.2-höz - kényszerítenem kell a verziókezelés(egyezés) miatt
implementation('org.springdoc:springdoc-openapi-starter-webmvc-ui') {
version { strictly '2.7.0' }
}
// --- DB & migrations ---
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-database-postgresql'
runtimeOnly 'org.postgresql:postgresql:42.7.7'
// --- Lombok ---
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// --- Test ---
testImplementation 'org.springframework.boot:spring-boot-starter-test' // JUnit 5, Mockito, AssertJ, Spring Test
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.springframework.security:spring-security-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' // IDE futtatáshoz hasznos
testImplementation platform("org.testcontainers:testcontainers-bom:1.20.2")
testImplementation "org.testcontainers:junit-jupiter"
testImplementation "org.testcontainers:postgresql"
testImplementation "org.testcontainers:jdbc"
testImplementation "org.postgresql:postgresql"
testRuntimeOnly "org.postgresql:postgresql"
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
tasks.named('test') {
useJUnitPlatform()
// GARANTÁLJUK, hogy a 'test' profil menjen a JUnit alatt:
systemProperty 'spring.profiles.active', 'test'
finalizedBy jacocoTestReport
}
jacoco {
toolVersion = '0.8.12'
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = true
csv.required = false
}
}
jacocoTestCoverageVerification {
dependsOn test
violationRules {
rule {
limit {
minimum = 0 // 0% gate – később emelhető
}
}
}
}
configurations.all {
resolutionStrategy.eachDependency { d ->
if (d.requested.group == 'org.springdoc') {
d.useVersion '2.7.0'
}
}
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
systemProperty 'spring.profiles.active', 'test'
systemProperty 'spring.datasource.url', 'jdbc:tc:postgresql:16-alpine:///perfdb'
systemProperty 'spring.datasource.username', 'test'
systemProperty 'spring.datasource.password', 'test'
systemProperty 'java.net.preferIPv4Stack', 'true'
}