-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
90 lines (77 loc) · 2.4 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
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.netflix.nebula:gradle-ospackage-plugin:9.1.1'
}
}
apply plugin: 'application'
apply plugin: 'nebula.ospackage-application'
ext.swimVersion = project.property('swim.version')
version = project.property('filethesebirds.version')
repositories {
mavenCentral()
}
dependencies {
// SwimOS
implementation group: 'org.swimos', name: 'swim-api', version: swimVersion
implementation group: 'org.swimos', name: 'swim-server', version: swimVersion
// Markdown
implementation group: 'org.commonmark', name: 'commonmark', version: '0.19.0'
implementation group: 'org.commonmark', name: 'commonmark-ext-autolink', version: '0.19.0'
// String shenanigans
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.9'
// Database
implementation group: 'com.zaxxer', name: 'HikariCP', version: '5.0.1'
implementation group: 'org.postgresql', name: 'postgresql', version: '42.6.0'
testImplementation 'org.testng:testng:7.6.1'
}
compileJava {
options.release = 11
}
application {
mainClass = 'filethesebirds.munin.Main'
}
test {
useTestNG()
scanForTestClasses = false
include '**/*Spec.class'
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
exceptionFormat 'full'
displayGranularity = 4
}
}
ospackage {
release '1'
prefix '/opt/swim-munin'
}
task packageDeb(type: Deb) {
maintainer = '[email protected]'
configurationFile("/etc/sysconfig/${project.name}")
preInstall "addgroup --quiet --system ${project.name}"
preInstall "adduser --quiet --system --ingroup ${project.name} --no-create-home --disabled-password ${project.name}"
postInstall "systemctl preset ${project.name} > /dev/null 2>&1"
postInstall "systemctl start ${project.name} > /dev/null 2>&1"
preUninstall "systemctl disable ${project.name} > /dev/null 2>&1"
preUninstall "systemctl stop ${project.name} > /dev/null 2>&1"
postUninstall "systemctl daemon-reload > /dev/null 2>&1"
from('pkg') {
into '/etc/systemd/system'
include '*.service'
addParentDirs false
expand project.properties
user 'root'
permissionGroup 'root'
fileMode = 0644
}
from('pkg') {
into '/etc/sysconfig'
include "${project.name}"
user 'root'
permissionGroup 'root'
fileMode = 0644
fileType CONFIG | NOREPLACE
}
}