forked from 0xCA5A/jbert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
117 lines (99 loc) · 3.25 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.netflix.nebula:gradle-ospackage-plugin:1.12.2'
}
}
plugins {
id "com.github.johnrengelman.shadow" version "5.0.0"
id "application"
id "java"
id "net.ltgt.apt-eclipse" version "0.21"
id "nebula.ospackage" version "4.8.0"
}
apply plugin: 'nebula.deb'
description "jbert control application"
version "0.3.0"
group "ch.jbert"
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
repositories {
mavenCentral()
maven { url "https://jcenter.bintray.com" }
}
configurations {
// for dependencies that are needed for development only
developmentOnly
}
dependencies {
// Micronaut generated dependencies
annotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion")
annotationProcessor "io.micronaut:micronaut-graal"
annotationProcessor "io.micronaut:micronaut-inject-java"
annotationProcessor "io.micronaut:micronaut-validation"
compileOnly "org.graalvm.nativeimage:svm"
implementation platform("io.micronaut:micronaut-bom:$micronautVersion")
implementation "io.micronaut:micronaut-http-client"
implementation "io.micronaut:micronaut-inject"
implementation "io.micronaut:micronaut-validation"
implementation "io.micronaut:micronaut-runtime"
implementation "io.micronaut:micronaut-http-server-netty"
runtimeOnly "ch.qos.logback:logback-classic:1.2.3"
testAnnotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion")
testAnnotationProcessor "io.micronaut:micronaut-inject-java"
testImplementation platform("io.micronaut:micronaut-bom:$micronautVersion")
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "io.micronaut.test:micronaut-test-junit5"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
// Sub-Project dependencies
compile project(':core')
}
test.classpath += configurations.developmentOnly
mainClassName = "ch.jbert.Application"
// use JUnit 5 platform
test {
useJUnitPlatform()
}
shadowJar {
mergeServiceFiles()
}
run.classpath += configurations.developmentOnly
run.jvmArgs("-noverify",
"-XX:TieredStopAtLevel=1",
"-Dcom.sun.management.jmxremote",
"-Dcom.sun.management.jmxremote.port=7777",
"-Dcom.sun.management.jmxremote.local.only=false",
"-Dcom.sun.management.jmxremote.authenticate=false",
"-Dcom.sun.management.jmxremote.ssl=false")
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
options.compilerArgs.add("-deprecation")
options.compilerArgs.add("-Werror")
}
task jbertDebPackage(type: Deb) {
maintainer "[email protected]"
user "jbert"
permissionGroup "users"
preDepends "openjdk-8-jre-headless"
into '/usr/share/jbert'
from('build/libs') {
into 'lib'
}
from('build/scriptsShadow') {
into 'bin'
exclude '*.bat'
fileMode 0550
}
from('systemd') {
into 'bin'
}
from('src/main/resources') {
fileType CONFIG | NOREPLACE
into 'conf'
}
link('/lib/systemd/system/jbert.service', '/usr/share/jbert/bin/jbert.service')
link('/etc/default/jbert', '/usr/share/jbert/bin/environment')
}