-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
119 lines (96 loc) · 2.89 KB
/
build.gradle
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
114
115
116
117
118
plugins {
id 'java'
id 'jacoco'
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
id "org.sonarqube" version '4.4.1.3373'
id "org.flywaydb.flyway" version "10.15.2"
}
group = 'com.quemistry'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '21'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
testCompile {
/* only junit 5 should be used */
exclude group: 'junit', module: 'junit'
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testRuntime {
/* only junit 5 should be used */
exclude group: 'junit', module: 'junit'
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.flywaydb:flyway-database-postgresql'
implementation 'org.flywaydb:flyway-core'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'redis.clients:jedis'
implementation 'org.mapstruct:mapstruct:1.5.5.Final'
implementation 'com.fasterxml.jackson.core:jackson-databind'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'com.h2database:h2:2.3.230' // Replace with the latest version
runtimeOnly "org.springframework.boot:spring-boot-starter-actuator"
runtimeOnly 'org.postgresql:postgresql'
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
afterEvaluate {
excludedClassFilesForReport(classDirectories)
}
}
private excludedClassFilesForReport(classDirectories) {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/entity/*.class',
'**/model/**/*.class',
'**/model/*.class',
'**/entity/**/*.class',
'**/Application.class',
'**/constant/**/*.class',
'**/constant/*.class'
])
}))
}
bootJar {
archiveFileName = "auth_ms.jar"
archiveClassifier.set(null)
}
tasks.register('installLocalGitHook', Copy) {
from new File(rootProject.rootDir, 'scripts/pre-commit')
into { new File(rootProject.rootDir, '.git/hooks') }
fileMode 0775
}
build {
finalizedBy('installLocalGitHook')
}
sonar {
properties {
property "sonar.projectKey", "mtech-31-quemistry_auth_ms"
property "sonar.organization", "mtech-31-quemistry"
property "sonar.host.url", "https://sonarcloud.io"
property 'sonar.coverage.exclusions', "**/entity/**, **/model/**, **/Application*, **/constant/**, **/entity/**/**"
}
}