This repository has been archived by the owner on Dec 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle
117 lines (100 loc) · 2.32 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
import groovy.json.JsonSlurper
plugins {
id 'com.moowork.node' version '1.3.1'
id 'net.linguica.maven-settings' version '0.5'
}
def versionFile = new File('package.json')
def versionObject = new JsonSlurper().parseText(versionFile.text)
ext {
glowingBearVersion = versionObject['version']
nodeVersion = '12.22.0'
yarnVersion = '1.22.4'
gradleWrapperVersion = '4.10.3'
}
version = glowingBearVersion
group = 'nl.thehyve'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'distribution'
apply plugin: 'com.moowork.node'
apply plugin: 'net.linguica.maven-settings'
apply plugin: 'maven-publish'
repositories {
repositories {
mavenLocal()
mavenCentral()
}
}
wrapper {
gradleVersion = gradleWrapperVersion
}
node {
version = nodeVersion
yarnVersion = yarnVersion
download = true
}
task yarnPackage(type: YarnTask, dependsOn: 'yarn') {
group = 'application'
description = 'Builds the application'
args = ['run', 'package']
}
distTar.dependsOn(yarnPackage)
task yarnLint(type: YarnTask, dependsOn: 'yarn') {
group = 'verification'
description = 'Performs static code analysis'
args = ['run', 'lint']
}
check.dependsOn(yarnLint)
task yarnTest(type: YarnTask, dependsOn: 'yarn') {
group = 'verification'
description = 'Executes user interface unit tests'
args = ['run', 'testOnce']
}
check.dependsOn(yarnTest)
task yarnCodecov(type: YarnTask, dependsOn: 'yarn') {
group = 'verification'
description = 'Report code coverage'
args = ['run', 'report-coverage']
}
clean {
delete fileTree(dir: 'dist')
delete 'coverage'
}
distributions {
main {
baseName = 'glowing-bear'
contents {
from 'dist'
include '**'
}
}
cypress {
baseName = 'glowing-bear-cypress-tests'
contents {
from 'cypress'
include '**'
}
}
}
distZip.enabled = false
cypressDistTar.enabled = false
publishing {
repositories {
maven {
name 'nl.thehyve.nexus'
url 'https://repo.thehyve.nl/content/repositories/snapshots/'
}
}
publications {
app(MavenPublication) {
artifactId 'glowing-bear'
artifact distTar // Publish the output of the distTar task
}
cypressTests(MavenPublication) {
artifactId 'glowing-bear-cypress-tests'
artifact cypressDistZip
}
}
}
publishToMavenLocal.dependsOn 'distTar'
publish.dependsOn 'distTar'