forked from Gaia3D/mago3d-CMS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
112 lines (93 loc) · 3.49 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
// gradle build -Pprofile=real (or real, demo)
final String DEFAULT_PROFILE = 'local'
buildscript {
ext {
springBootVersion = '1.5.12.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'org.springframework.boot'
apply plugin: 'war'
war {
baseName = 'mago3d-admin'
version = '0.0.1-SNAPSHOT'
}
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
// gralde 5.0 lombok error
//options.compilerArgs += ["-proc:none"]
}
compileJava.options.encoding = 'UTF-8'
repositories {
mavenCentral()
}
configurations {
providedRuntime
}
sourceSets {
main {
resources {
if (!project.hasProperty('profile') || !profile) {
println " ========== > default profile is local. "
ext.profile = DEFAULT_PROFILE
}
if (profile == 'real') {
println " ===========> profile file is ${profile}"
srcDir "src/main/resources/${profile}"
//copy {
// from "src/main/resources/${profile}"
// into "src/main/resources"
//}
} else {
println " ===========> profile file is ${profile}"
//srcDir "src/main/resources"
exclude "**/real/*"
}
}
}
}
dependencies {
// gradle build script가 groovy로 작성 되었고, ' 와 " 의 가장 큰 차이점은 String interpolation(문자열 보간법 = ${}) 변수를 사용할수 있다는 점이다.
compile project(':mago3d-core')
//compile('org.springframework.data:spring-data-rest-hal-browser')
compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2')
compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
// log4j2를 변경을 하려면 아래 부분을 추가하면 됨. 그런데 log4j2는 sql 로그가 기본값으로 출력되지 않음. log4jdbc를 사용해야 하는데 찜찜해서 그냥 logback 사용
//compile('org.springframework.boot:spring-boot-starter-web') {
// exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
//}
//compile('org.springframework.boot:spring-boot-starter-log4j2')
//compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.security:spring-security-core:4.2.2.RELEASE')
compile 'org.apache.httpcomponents:httpclient:4.5.3'
compile 'commons-codec:commons-codec:1.10'
compile 'com.zaxxer:HikariCP:2.7.7'
//compile 'org.apache.commons:commons-dbcp2:2.1.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.8'
compile 'org.apache.poi:poi:3.16'
compile 'org.apache.poi:poi-ooxml:3.16'
compile 'org.springframework.boot:spring-boot-configuration-processor'
//compile('org.springframework.boot:spring-boot-starter-cache')
//compile 'net.sf.ehcache:ehcache:2.10.4'
compile('javax.servlet:javax.servlet-api:3.1.0')
compile 'javax.servlet:jstl:1.2'
compile 'org.apache.logging.log4j:log4j:2.8.2'
//compile('org.springframework.boot:spring-boot-starter-actuator')
//compile 'io.springfox:springfox-swagger2:2.7.0'
//compile 'io.springfox:springfox-swagger-ui:2.7.0'
compileOnly('org.projectlombok:lombok')
runtime('org.springframework.boot:spring-boot-devtools')
runtime('org.postgresql:postgresql')
providedRuntime('org.apache.tomcat.embed:tomcat-embed-jasper')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.restdocs:spring-restdocs-mockmvc')
}