-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
69 lines (56 loc) · 1.84 KB
/
build.gradle
File metadata and controls
69 lines (56 loc) · 1.84 KB
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
plugins {
id "com.moowork.node" version "1.3.1" // Allows for node download & execution via gradle
id 'org.springframework.boot' version '2.1.4.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
group = 'dev.dowell'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'com.h2database:h2'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
}
node {
download = true
// Set the work directory for unpacking node
workDir = file("${project.buildDir}/nodejs")
// Set the work directory for NPM
npmWorkDir = file("${project.buildDir}/npm")
}
task appNpmInstall(type: NpmTask) {
description = "Installs all dependencies from package.json"
workingDir = file("${project.projectDir}/webapp")
args = ["install"]
}
task appNpmBuild(type: NpmTask) {("/markdown")
description = "Builds production version of the webapp"
workingDir = file("${project.projectDir}/webapp")
args = ["run", "build"]
}
task appNpmTest(type: NpmTask) {
description = "Runs webapp tests"
workingDir = file("${project.projectDir}/webapp")
args = ["test"]
}
task copyWebApp(type: Copy) {
from 'webapp/build'
into 'build/resources/main/static/.'
}
appNpmBuild.dependsOn appNpmInstall
appNpmTest.dependsOn appNpmBuild
copyWebApp.dependsOn appNpmTest
bootJar.dependsOn copyWebApp