-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
96 lines (82 loc) · 2.23 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
buildscript {
ext {
springBootVersion = '1.3.2.RELEASE'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("com.moowork.gradle:gradle-node-plugin:0.11")
}
}
plugins {
id "com.github.kt3k.coveralls" version "2.6.3"
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'com.moowork.node'
apply plugin: 'jacoco'
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
jar {
baseName = 'potoo'
version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-data-mongodb')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-data-rest')
compile("org.springframework.boot:spring-boot-starter-security")
compile('com.fasterxml.jackson.datatype:jackson-datatype-joda:2.6.3')
compile('joda-time:joda-time:2.9.2')
compile('org.projectlombok:lombok:1.16.8')
compile('io.jsonwebtoken:jjwt:0.6.0')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.assertj:assertj-core:3.3.0')
testCompile('com.jayway.jsonpath:json-path-assert:2.2.0')
}
task wrapper(type: Wrapper) {
gradleVersion = '2.9'
}
task stage {
dependsOn build
}
npmInstall {
execOverrides {
it.workingDir = file("${project.projectDir}/src/webapp")
}
}
task buildWebApp(type: NpmTask, dependsOn: 'npmInstall') {
workingDir = file("${project.projectDir}/src/webapp")
args = ['run', 'build']
}
task copyWebApp(type: Copy, dependsOn: 'buildWebApp') {
from(file("${project.projectDir}/src/webapp/dist"))
into(file("${project.buildDir}/resources/main/static"))
}
bootRun.dependsOn copyWebApp
jar.dependsOn copyWebApp
node {
version = '5.6.0'
npmVersion = '3.6.0'
download = true
workDir = file("${project.projectDir}/src/webapp/nodejs")
nodeModulesDir = file("${project.projectDir}/src/webapp")
}
task cleanWebApp(type: Delete) {
delete 'src/webapp/dist', 'src/webapp/node_modules', 'src/webapp/nodejs'
}