mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-02-08 20:30:11 +00:00
92 lines
1.8 KiB
Groovy
92 lines
1.8 KiB
Groovy
plugins {
|
|
id "java"
|
|
id "nebula.ospackage" version "9.1.1"
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(11)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation libs.bouncy.castle
|
|
implementation libs.glassfish.json
|
|
implementation libs.glassfish.jaxb.runtime
|
|
implementation libs.jcommander
|
|
implementation libs.javax.json
|
|
implementation libs.javax.jaxb
|
|
implementation libs.javax.annotation
|
|
|
|
testImplementation libs.testng
|
|
}
|
|
|
|
jar {
|
|
// Keep jar clean:
|
|
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.MF'
|
|
|
|
manifest {
|
|
attributes(
|
|
'Main-Class': 'hirs.swid.Main',
|
|
'Class-Path': configurations.runtimeClasspath.files.collect { it.getName() }.join(' ')
|
|
)
|
|
}
|
|
}
|
|
|
|
// Get version from main project gradle
|
|
def packVersion = properties.get("packageVersion");
|
|
println "packageVersion is ${packVersion}"
|
|
|
|
ospackage {
|
|
packageName = 'tcg-rim-tool'
|
|
os = LINUX
|
|
arch = NOARCH
|
|
version = "$packVersion"
|
|
release = '1'
|
|
|
|
into '/opt/hirs/rimtool'
|
|
user 'root'
|
|
fileMode = 0755
|
|
|
|
from(jar.outputs.files) {
|
|
into 'lib'
|
|
}
|
|
|
|
from('libs') {
|
|
into 'lib'
|
|
}
|
|
|
|
from(configurations.runtimeClasspath) {
|
|
into 'lib'
|
|
}
|
|
|
|
from('scripts') {
|
|
exclude {
|
|
FileTreeElement details ->
|
|
details.file.name.endsWith('.bat')
|
|
}
|
|
into 'scripts'
|
|
}
|
|
|
|
from('data') {
|
|
exclude {
|
|
FileTreeElement details ->
|
|
details.file.name.endsWith('.md')
|
|
}
|
|
into './'
|
|
link("/usr/local/bin/rim", "/opt/hirs/rimtool/scripts/rimtool.sh", 0x755)
|
|
}
|
|
}
|
|
|
|
buildRpm {
|
|
arch = I386
|
|
}
|
|
|
|
buildDeb {
|
|
arch = I386
|
|
}
|