-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
89 lines (73 loc) · 2.26 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
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' version '3.0.2'
id 'io.spring.dependency-management' version '1.1.0'
id 'com.gorylenko.gradle-git-properties' version '2.4.0'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
group = 'de.daniel.marlinghaus.trivy'
version = '0.0.1'
sourceCompatibility = '17'
targetCompatibility = '17'
compileJava.options.encoding = 'UTF-8'
repositories {
maven {
credentials {
username nexusUsername
password nexusPassword
}
url nexusBaseUrl +'/repository/public/'
}
mavenCentral()
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
sourceSets {
main.java.srcDirs += ["src/main/java", "build/generated"]
}
dependencies {
//annotation processors
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
annotationProcessor("org.projectlombok:lombok")
testAnnotationProcessor("org.projectlombok:lombok")
compileOnly("org.projectlombok:lombok")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.3")
implementation("org.apache.commons:commons-lang3")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}
dependencyManagement {
imports {
mavenBom(SpringBootPlugin.BOM_COORDINATES)
}
}
bootJar {
archiveFileName = 'app.jar'
manifest {
attributes 'Implementation-Version': project.version, 'Implementation-Title': project.group.toString().substring(project.group.toString().length() - 3).toUpperCase()
}
}
bootRun {
if (project.hasProperty('args')) {
args project.args.split(',')
}
}
test {
useJUnitPlatform()
afterTest { desc, result ->
logger.quiet "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << '-Xlint:-deprecation'
}
springBoot {
buildInfo()
}
apply from: 'gradle/utils.gradle'