Skip to content

Commit 810a1db

Browse files
committed
temp
1 parent fa0c2e3 commit 810a1db

File tree

1 file changed

+43
-4
lines changed

1 file changed

+43
-4
lines changed

livedronemap-user/build.gradle

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// gradle build -Pprofile=real (or real, demo)
2+
final String DEFAULT_PROFILE = 'local'
3+
14
buildscript {
25
ext {
36
springBootVersion = '2.0.4.RELEASE'
@@ -17,9 +20,18 @@ apply plugin: 'org.springframework.boot'
1720
apply plugin: 'io.spring.dependency-management'
1821
apply plugin: 'war'
1922

20-
group = 'gaia3d'
21-
version = '0.0.1-SNAPSHOT'
22-
sourceCompatibility = 1.8
23+
war {
24+
baseName = 'livedronemap-user'
25+
version = '0.0.1-SNAPSHOT'
26+
}
27+
28+
compileJava {
29+
sourceCompatibility = 1.8
30+
targetCompatibility = 1.8
31+
// gralde 5.0 lombok error
32+
//options.compilerArgs += ["-proc:none"]
33+
}
34+
compileJava.options.encoding = 'UTF-8'
2335

2436
repositories {
2537
mavenCentral()
@@ -29,12 +41,38 @@ configurations {
2941
providedRuntime
3042
}
3143

44+
sourceSets {
45+
main {
46+
resources {
47+
if (!project.hasProperty('profile') || !profile) {
48+
println " ========== > default profile is local. "
49+
ext.profile = DEFAULT_PROFILE
50+
}
51+
52+
if (profile == 'real') {
53+
println " ===========> profile file is ${profile}"
54+
srcDir "src/main/resources/${profile}"
55+
//copy {
56+
// from "src/main/resources/${profile}"
57+
// into "src/main/resources"
58+
//}
59+
} else {
60+
println " ===========> profile file is ${profile}"
61+
//srcDir "src/main/resources"
62+
exclude "**/real/*"
63+
}
64+
}
65+
}
66+
}
67+
3268
dependencies {
3369
compile('org.springframework.boot:spring-boot-starter-web')
3470
compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2')
3571
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
3672
compile('javax.servlet:jstl')
3773
compile ('org.apache.commons:commons-io:1.3.2')
74+
compile 'com.zaxxer:HikariCP:3.2.0'
75+
compile 'org.apache.taglibs:taglibs-standard-jstlel:1.2.5'
3876

3977
runtime('org.springframework.boot:spring-boot-devtools')
4078
runtime('org.postgresql:postgresql')
@@ -44,7 +82,8 @@ dependencies {
4482
compileOnly("org.projectlombok:lombok:$lombokVersion")
4583
testAnnotationProcessor("org.projectlombok:lombok:$lombokVersion")
4684
testCompileOnly("org.projectlombok:lombok:$lombokVersion")
47-
85+
//compileOnly("org.projectlombok:lombok:$lombokVersion")
86+
4887
testCompile('org.springframework.boot:spring-boot-starter-test')
4988

5089
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')

0 commit comments

Comments
 (0)