2021-05-04 12:23:34 +00:00
|
|
|
plugins {
|
|
|
|
id 'application'
|
2021-05-07 15:53:47 +00:00
|
|
|
|
|
|
|
id "com.github.johnrengelman.shadow" version "6.1.0"
|
|
|
|
id "net.nemerosa.versioning" version "2.14.0"
|
|
|
|
id "nebula.ospackage" version "8.4.1"
|
2021-05-04 12:23:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-05-04 15:54:47 +00:00
|
|
|
testImplementation project(':shared')
|
2021-05-04 12:23:34 +00:00
|
|
|
implementation project(':shared')
|
|
|
|
|
2021-05-07 15:53:47 +00:00
|
|
|
annotationProcessor "info.picocli:picocli-codegen:${picocliVersion}"
|
|
|
|
implementation "info.picocli:picocli:${picocliVersion}"
|
|
|
|
|
2021-05-04 15:54:47 +00:00
|
|
|
implementation group: 'org.apache.camel', name: 'camel-core', version: camelVersion
|
2021-05-06 11:26:53 +00:00
|
|
|
implementation group: 'org.apache.camel', name: 'camel-main', version: camelVersion
|
2021-05-04 15:54:47 +00:00
|
|
|
implementation group: 'org.apache.camel', name: 'camel-rest', version: camelVersion
|
|
|
|
implementation group: 'org.apache.camel', name: 'camel-jetty', version: camelVersion
|
|
|
|
implementation group: 'org.apache.camel', name: 'camel-stream', version: camelVersion
|
2021-05-06 11:26:53 +00:00
|
|
|
implementation group: 'org.apache.camel', name: 'camel-jackson', version: camelVersion
|
2021-05-04 15:54:47 +00:00
|
|
|
implementation group: 'org.apache.camel', name: 'camel-influxdb', version: camelVersion
|
2021-05-04 12:23:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
// Define the main class for the application.
|
2021-05-07 10:39:55 +00:00
|
|
|
mainClassName = 'org.sysmon.server.Application'
|
2021-05-04 12:23:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named('test') {
|
|
|
|
// Use junit platform for unit tests.
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
2021-05-07 15:53:47 +00:00
|
|
|
|
|
|
|
apply plugin: 'nebula.ospackage'
|
|
|
|
ospackage {
|
|
|
|
packageName = 'sysmon-server'
|
|
|
|
release = '1'
|
|
|
|
user = 'root'
|
|
|
|
packager = "Mark Nellemann <mark.nellemann@gmail.com>"
|
|
|
|
|
|
|
|
into '/opt/sysmon-server'
|
|
|
|
|
|
|
|
from(shadowJar.outputs.files) {
|
|
|
|
into 'lib'
|
|
|
|
}
|
|
|
|
|
|
|
|
from('build/scriptsShadow') {
|
|
|
|
into 'bin'
|
|
|
|
}
|
|
|
|
|
|
|
|
from('doc/') {
|
|
|
|
into 'doc'
|
|
|
|
}
|
|
|
|
|
|
|
|
from(['README.md', 'LICENSE']) {
|
|
|
|
into 'doc'
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
buildRpm {
|
|
|
|
dependsOn startShadowScripts
|
|
|
|
os = "LINUX"
|
|
|
|
}
|
|
|
|
|
|
|
|
buildDeb {
|
|
|
|
dependsOn startShadowScripts
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes(
|
|
|
|
'Created-By' : "Gradle ${gradle.gradleVersion}",
|
|
|
|
'Build-OS' : "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}",
|
|
|
|
'Build-Jdk' : "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
|
|
|
|
'Build-User' : System.properties['user.name'],
|
|
|
|
'Build-Version' : versioning.info.tag ?: (versioning.info.branch + "-" + versioning.info.build),
|
|
|
|
'Build-Revision' : versioning.info.commit,
|
|
|
|
'Build-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ss.SSSZ").toString(),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|