-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
138 lines (113 loc) · 3.8 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
plugins {
id 'org.springframework.boot' version '2.2.2.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id "com.github.node-gradle.node" version "3.0.1"
id 'org.unbroken-dome.test-sets' version '2.2.1'
id 'org.sonarqube' version '2.7'
id 'java'
}
group = 'net.zevrant-services.home.ui'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.11'
if (project.hasProperty('projVersion')) {
project.version = project.projVersion
ext.isSnapshot = false
} else {
project.version = '0.0.1-snapshot'
}
repositories {
mavenLocal()
mavenCentral()
maven {
url "s3://zevrant-artifact-store"
authentication {
awsIm(AwsImAuthentication)
}
}
}
ext {
set('springCloudVersion', 'Hoxton.SR3')
serenityCoreVersion = '2.3.4'
serenityCucumberVersion = '2.3.4'
junitVersion = '4.12'
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-starter-oauth2'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-zuul'
implementation 'io.micrometer:micrometer-registry-prometheus'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testCompile group: 'org.hamcrest', name: 'hamcrest-core', version: '2.2'
testCompile "net.serenity-bdd:serenity-core:${serenityCoreVersion}",
"net.serenity-bdd:serenity-cucumber6:${serenityCucumberVersion}",
"net.serenity-bdd:serenity-screenplay:${serenityCoreVersion}",
"net.serenity-bdd:serenity-screenplay-webdriver:${serenityCoreVersion}",
"net.serenity-bdd:serenity-ensure:${serenityCoreVersion}"
compile group: 'javax.mail', name: 'javax.mail-api', version: '1.6.2'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
node {
version = '10.16.3'
download = true
distBaseUrl = 'https://nodejs.org/dist'
}
npmInstall {
inputs.file 'package.json'
inputs.file 'package-lock.json'
outputs.files fileTree('nodeModules')
}
npm_run_build {
// make sure the build task is executed only when appropriate files change
// inputs.files fileTree('src/main/angular')
//
// // 'node_modules' appeared not reliable for dependency change detection (the task was rerun without changes)
// // though 'package.json' and 'package-lock.json' should be enough anyway
outputs.upToDateWhen { false }
//
outputs.file 'src/main/resources/static/index.html'
outputs.file 'src/main/resources/static/main-es5.js'
outputs.file 'src/main/resources/static/main-es2015.js'
outputs.file 'src/main/resources/static/polyfill-es5.js'
outputs.file 'src/main/resources/static/runtime-es5.js'
outputs.file 'src/main/resources/static/styles-es5.js'
outputs.file 'src/main/resources/static/styles-es2015.js'
outputs.file 'src/main/resources/static/vendor-es5.js'
outputs.file 'src/main/resources/static/vendor-es2015.js'
}
task moveFavIcon(type: Copy) {
from file("$buildDir/resources/main/favicon.ico")
into file("$buildDir/resources/main/static")
}
test {
useJUnitPlatform()
}
clean {
doFirst {
delete files("${rootDir}/src/main/resources/static/")
}
}
task npm_run_test(type: NpmTask) {
args = ['run', 'test']
}
testSets {
integrationTest { dirName = 'integrationTest' }
}
integrationTest {
useJUnitPlatform ()
}
task npx_run_update(type: NpxTask) {
command = 'npm-check-updates'
args = ['-u']
}
tasks.compileJava.finalizedBy npm_run_build
tasks.npm_run_build.dependsOn(tasks.npmInstall)
tasks.bootJar.dependsOn(tasks.moveFavIcon)
tasks.npx_run_update.finalizedBy(tasks.npmInstall)
tasks.npx_run_update.finalizedBy(tasks.npm_run_build)
//tasks.test.finalizedBy tasks.npm_run_test