-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
101 lines (79 loc) · 2.64 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
// central build script file
plugins {
//id "java"
id "war"
id "eclipse"
id "idea"
id "org.springframework.boot" version "2.7.1"
id "io.spring.dependency-management" version "1.0.12.RELEASE"
}
ext {
set("springCloudVersion", "2021.0.3")
env = System.getenv()
}
repositories {
mavenCentral()
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
configurations {
compile.exclude module: "spring-boot-starter-tomcat" // exclude tomcat, because only jetty is used
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
dependencies {
// Web
implementation "org.springframework.boot:spring-boot-starter-web"
//providedRuntime "org.springframework.boot:spring-boot-starter-jetty"
implementation "org.springframework.boot:spring-boot-devtools"
// Security
implementation "org.springframework.boot:spring-boot-starter-security"
implementation "org.springframework.security:spring-security-taglibs"
// JWT handling
implementation "com.nimbusds:nimbus-jose-jwt:9.23"
// JSP support
providedRuntime "javax.servlet:jstl"
providedRuntime "org.apache.tomcat.embed:tomcat-embed-jasper"
// JSON binding
implementation "org.springframework.boot:spring-boot-starter-json"
// Logging
//implementation "org.springframework.boot:spring-boot-starter-log4j2"
// jackson-dataformat-yaml is required to process log4j2.yml
runtimeOnly "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.10"
// REST client
implementation "org.springframework.cloud:spring-cloud-starter-openfeign"
// Send application/x-www-form-urlencoded with feign
implementation "io.github.openfeign.form:feign-form:3.8.0"
// Database
implementation "org.springframework.boot:spring-boot-starter-jdbc"
runtimeOnly "com.h2database:h2"
// Tests
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude group: "org.junit.vintage", module: "junit-vintage-engine"
}
// Test security helpers
testImplementation("org.springframework.security:spring-security-test")
}
test {
useJUnitPlatform()
}
springBoot {
buildInfo{
properties {
group = group
additional = ['number': build]
}
}
}
// bootJar task generates an incomplete jar which does not include webapp resources
//bootJar.enabled = false
bootWar {
archiveClassifier = build.toString()
manifest {
attributes('Implementation-Title': title,
'Implementation-Version': archiveVersion.getOrElse("0.0"))
}
}