-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
143 lines (118 loc) · 4.42 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
plugins {
id "org.springframework.boot" version "3.3.6"
id "io.spring.dependency-management" version "1.1.6"
id "io.freefair.lombok" version "8.11"
id "io.freefair.maven-publish-java" version "8.11"
id "org.owasp.dependencycheck" version "11.1.0"
id 'org.asciidoctor.jvm.convert' version '4.0.3'
id 'net.researchgate.release' version '3.0.2'
id "com.gorylenko.gradle-git-properties" version "2.4.2"
id 'java'
id 'jacoco'
}
ext {
// versions of dependencies
javersVersion = '7.7.0'
springDocVersion = '2.6.0'
}
description = 'Generic indexing service supporting different mapping implementations.'
group = 'edu.kit.datamanager'
println "Running gradle version: $gradle.gradleVersion"
println "Building ${name} version: ${version}"
println "JDK version: ${JavaVersion.current()}"
repositories {
mavenLocal()
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
configurations {
asciidoctorExt
compileOnly {
extendsFrom annotationProcessor
}
}
if (System.getProperty('profile') == 'minimal') {
println 'Using minimal profile for building ' + project.getName()
apply from: 'gradle/profile-minimal.gradle'
} else {
println 'Using default profile executing all tests for building ' + project.getName()
apply from: 'gradle/profile-complete.gradle'
}
dependencies {
// Spring
implementation 'org.springframework:spring-messaging:6.2.0'
implementation 'org.springframework.cloud:spring-cloud-gateway-mvc:4.1.5'
// Spring Boot
// boot starter
implementation "org.springframework.boot:spring-boot-starter-data-rest"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation "org.springframework.boot:spring-boot-starter-amqp"
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.springframework.boot:spring-boot-starter-security"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
implementation 'org.springframework.data:spring-data-elasticsearch:5.4.0'
// springdoc
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${springDocVersion}"
implementation "org.springdoc:springdoc-openapi-starter-common:${springDocVersion}"
implementation "org.springdoc:springdoc-openapi-starter-webmvc-api:${springDocVersion}"
// driver for postgres
implementation "org.postgresql:postgresql:42.7.4"
//driver for h2
implementation "com.h2database:h2:2.3.232"
//apache
implementation "org.apache.tika:tika-core:3.0.0"
implementation "commons-codec:commons-codec:1.17.1"
implementation "com.github.jknack:handlebars:4.4.0"
implementation "org.json:json:20240303"
// javers
implementation "org.javers:javers-spring-boot-starter-sql:${javersVersion}"
implementation "org.javers:javers-core:${javersVersion}"
// datamanager
implementation "edu.kit.datamanager:generic-message-consumer:1.1.1"
implementation "edu.kit.datamanager:repo-core:1.2.3"
implementation "edu.kit.datamanager:service-base:1.3.2"
// actuator
implementation 'de.codecentric:spring-boot-admin-starter-client:3.3.6'
runtimeOnly 'org.apache.httpcomponents:httpclient:4.5.14'
// Additional libraries for tests
testImplementation "com.google.guava:guava:33.3.1-jre"
//Java 11 Support
testImplementation "org.mockito:mockito-core:5.14.2"
testImplementation "junit:junit:4.13.2"
// boot starter
testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:3.0.3'
testImplementation "org.springframework.security:spring-security-test"
testImplementation "org.springframework:spring-test"
}
jar {
// disable plain jar file
enabled = false
}
springBoot {
buildInfo()
}
bootJar {
manifest {
attributes 'Main-Class': 'org.springframework.boot.loader.launch.PropertiesLauncher'
}
dependsOn asciidoctor
from ("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
launchScript()
}
jacoco {
toolVersion = "0.8.12"
}
// task for printing project name.
task printProjectName {
doLast {
println "${project.name}"
}
}