-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
76 lines (58 loc) · 2.16 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
buildscript {
ext {
springBootVersion = '2.0.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
// for repackage as war , spring boot default is executeable jar
// build command is "gradle build" , gradle 4.6 尚找不到可以改 war 檔名的方法,以下的 war 區塊設定無效
apply plugin: 'war'
//war {
//// archiveName = 'ROOT.war'
// version = '' // no version
// baseName="filename"
//}
group = 'tw.noah'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
configurations {
providedRuntime
}
configurations.all {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
// exclude group: 'org.slf4j'
exclude module: "logback-classic"
}
dependencies {
// repackage as war , can't include tomcat library
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
compile('org.springframework.boot:spring-boot-starter-web')
compile group: 'org.apache.logging.log4j', name: 'log4j-api'
compile group: 'org.apache.logging.log4j', name: 'log4j-core'
// binding slf4j to log4j2
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.0'
// binding common-logging to log4j2
compile group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: '2.11.0'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.1'
compileOnly('org.projectlombok:lombok')
testCompileOnly('org.projectlombok:lombok')
// https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-jaxrs2
// compile group: 'io.swagger.core.v3', name: 'swagger-jaxrs2', version: '2.0.2'
// https://mvnrepository.com/artifact/io.springfox/springfox-swagger2
compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2'
testCompile('org.springframework.boot:spring-boot-starter-test')
// testCompile('org.springframework.restdocs:spring-restdocs-mockmvc')
}