2020-09-22 18:33:22 +00:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
id 'groovy'
|
|
|
|
id 'application'
|
|
|
|
id "com.github.johnrengelman.shadow" version "6.0.0"
|
|
|
|
id "net.nemerosa.versioning" version "2.14.0"
|
|
|
|
id "nebula.ospackage" version "8.4.1"
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile 'info.picocli:picocli:4.5.1'
|
|
|
|
annotationProcessor 'info.picocli:picocli-codegen:4.5.1'
|
|
|
|
|
|
|
|
implementation 'org.slf4j:slf4j-api:1.7.+'
|
|
|
|
runtimeOnly 'ch.qos.logback:logback-classic:1.+'
|
|
|
|
|
|
|
|
testImplementation('org.spockframework:spock-core:2.0-M3-groovy-3.0')
|
|
|
|
testImplementation("org.slf4j:slf4j-simple:1.7.+")
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
mainClassName = 'biz.nellemann.syslogd.SyslogServer'
|
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'nebula.ospackage'
|
|
|
|
ospackage {
|
|
|
|
packageName = 'syslogd'
|
|
|
|
release = '1'
|
|
|
|
user = 'root'
|
|
|
|
packager = "Mark Nellemann <mark.nellemann@gmail.com>"
|
|
|
|
|
|
|
|
into '/opt/syslogd'
|
|
|
|
|
|
|
|
from(shadowJar.outputs.files) {
|
|
|
|
into 'lib'
|
|
|
|
}
|
|
|
|
|
|
|
|
from('build/scriptsShadow') {
|
|
|
|
into 'bin'
|
|
|
|
}
|
|
|
|
|
|
|
|
from(['README.md', 'LICENSE']) {
|
|
|
|
into 'doc'
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
buildRpm {
|
|
|
|
dependsOn startShadowScripts
|
|
|
|
os = LINUX
|
|
|
|
}
|
|
|
|
|
|
|
|
buildDeb {
|
|
|
|
dependsOn startShadowScripts
|
|
|
|
requires('default-jre-headless')
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes(
|
2020-10-07 13:09:59 +00:00
|
|
|
'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(),
|
2020-09-22 18:33:22 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|