-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
147 lines (126 loc) · 4.27 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
plugins {
id 'org.springframework.boot' version '2.6.4'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.asciidoctor.convert' version '1.5.8'
id 'java'
id 'checkstyle'
id 'pmd'
id 'com.github.spotbugs' version '5.0.6'
id 'io.franzbecker.gradle-lombok' version '5.0.0'
}
group = 'mops'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
maven {
url = 'https://s3.cs.hhu.de/public/mops/'
metadataSources {
artifact()
}
}
}
ext {
set('snippetsDir', file('build/generated-snippets'))
set('testcontainersVersion', '1.16.2')
}
dependencies {
// compileOnly 'org.projectlombok:lombok'
// testCompileOnly 'org.projectlombok:lombok'
compileOnly "com.github.spotbugs:spotbugs-annotations:${spotbugs.toolVersion.get()}"
testCompileOnly "com.github.spotbugs:spotbugs-annotations:${spotbugs.toolVersion.get()}"
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'org.postgresql:postgresql'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
testRuntimeOnly 'com.h2database:h2'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
// annotationProcessor 'org.projectlombok:lombok'
// testAnnotationProcessor 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'mops:styleguide:2.2.0'
implementation 'io.minio:minio:8.3.7'
implementation 'org.keycloak:keycloak-spring-boot-starter:17.0.0'
implementation 'org.keycloak.bom:keycloak-adapter-bom:17.0.0'
implementation 'org.springframework.security.oauth:spring-security-oauth2:2.5.1.RELEASE'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:postgresql'
testImplementation 'com.c4-soft.springaddons:spring-security-test-keycloack-addons:1.2.0'
testImplementation 'com.tngtech.archunit:archunit-junit5:0.23.1'
}
dependencyManagement {
imports {
mavenBom "org.testcontainers:testcontainers-bom:${testcontainersVersion}"
}
dependencies {
dependency 'com.squareup.okhttp3:okhttp:4.9.3' // manually update okhttp because minio requires newer version and spring overwrites it
}
}
checkstyle.toolVersion = '10.0'
checkstyleTest.enabled = false
tasks.withType(Checkstyle) {
reports {
xml.required = false
html.required = true
}
}
pmd {
toolVersion = '6.43.0'
ruleSets = []
ruleSetFiles = files 'config/pmd/pmd.xml'
}
pmdTest.enabled = false
tasks.withType(Pmd) {
reports {
xml.required = false
html.required = true
}
}
spotbugs {
toolVersion = '4.6.0'
excludeFilter = file("$rootDir/config/spotbugs/excludeFilter.xml")
}
tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
reports {
xml.required = false
html.required = true
}
}
lombok {
version = '1.18.22'
}
task delombok(type: io.franzbecker.gradle.lombok.task.DelombokTask, dependsOn: compileJava) {
ext.outputDir = file "$buildDir/delombok"
outputs.dir(outputDir)
sourceSets.main.java.srcDirs.each {
inputs.dir(it)
args(it, "-d", outputDir)
}
}
javadoc {
dependsOn delombok
source = delombok.outputDir
destinationDir = file "doc/javadoc"
failOnError = false
}
tasks.named('test') {
outputs.dir snippetsDir
useJUnitPlatform()
}
tasks.named('asciidoctor') {
inputs.dir snippetsDir
dependsOn test
}