-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile_prod.gradle
53 lines (43 loc) · 1.11 KB
/
profile_prod.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
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'spring-boot'
apply plugin: 'com.moowork.node'
ext {
logbackLoglevel = "INFO"
}
dependencies {
compile group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version: spring_boot_version
}
bootRun {
args = ["--spring.profiles.active=prod"]
}
processResources {
filesMatching('**/logback-spring.xml') {
filter {
it.replace('@logback.loglevel@', logbackLoglevel)
}
}
}
task setProdProperties(dependsOn: bootRun) << {
doFirst {
System.setProperty('spring.profiles.active', 'prod')
}
}
task gruntBuild(type: Exec) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', 'grunt', '--force', 'build'
} else {
commandLine 'grunt', '--force', 'build'
}
}
task gruntTest(type: Exec) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', 'grunt', 'test'
} else {
commandLine 'grunt', 'test'
}
}
gruntBuild.dependsOn 'npmInstall'
gruntBuild.dependsOn 'bower'
processResources.dependsOn gruntBuild
test.dependsOn gruntTest
bootRun.dependsOn gruntTest