mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-19 04:58:00 +00:00
5f6a620ec2
This reverts commitf725f90392
, reversing changes made to25101314a2
.
98 lines
2.2 KiB
Groovy
98 lines
2.2 KiB
Groovy
plugins {
|
|
id "java"
|
|
id 'com.netflix.nebula.ospackage' version '11.4.0'
|
|
id 'com.intershop.gradle.jaxb' version '5.1.0'
|
|
}
|
|
|
|
// Get version from main project gradle
|
|
def packVersion = properties.get("packageVersion");
|
|
def jarVersion = properties.get("jarVersion");
|
|
//println "packageVersion is ${projVersion}"
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
flatDir { dirs "lib" }
|
|
}
|
|
|
|
dependencies {
|
|
implementation libs.bouncycastle
|
|
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
|
|
}
|
|
|
|
test {
|
|
testLogging.showStandardStreams true
|
|
}
|
|
|
|
jar {
|
|
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.MF'
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
manifest {
|
|
attributes("Main-Class": "hirs.swid.Main",
|
|
'Class-Path':configurations.runtimeClasspath.files.collect { it.getName() }.join(' ')
|
|
)
|
|
}
|
|
//jar name format: [archiveBaseName]-[archiveAppendix]-[archiveVersion]-[archiveClassifier].[archiveExtension]
|
|
archiveVersion = jarVersion
|
|
}
|
|
|
|
ospackage {
|
|
packageName = 'tcg-rim-tool'
|
|
os = LINUX
|
|
arch = NOARCH
|
|
version = "$packVersion"
|
|
release = '1'
|
|
|
|
user 'root'
|
|
fileMode = 0755
|
|
|
|
into ('/opt/hirs/rimtool/lib') {
|
|
from jar.outputs.files
|
|
from configurations.runtimeClasspath
|
|
from 'libs'
|
|
}
|
|
|
|
into ('/opt/hirs/rimtool/scripts') {
|
|
from ('scripts') {
|
|
exclude {
|
|
FileTreeElement details ->
|
|
details.file.name.endsWith('.bat')
|
|
}
|
|
}
|
|
}
|
|
into ('/opt/hirs/rimtool/docs') {
|
|
from('./') {
|
|
include {
|
|
FileTreeElement details ->
|
|
details.file.name.endsWith('.md')
|
|
}
|
|
}
|
|
}
|
|
into ('/opt/hirs/rimtool/data') {
|
|
from('src/test/resources/') {
|
|
}
|
|
}
|
|
link("/usr/local/bin/rim", "/opt/hirs/rimtool/scripts/rimtool.sh", 0x755)
|
|
}
|
|
|
|
buildRpm {
|
|
arch = X86_64
|
|
}
|
|
|
|
buildDeb {
|
|
arch = 'amd64'
|
|
}
|
|
|