2023-03-17 18:47:10 +00:00
|
|
|
plugins {
|
|
|
|
id "java"
|
|
|
|
id "nebula.ospackage" version "9.1.1"
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|
2020-01-06 21:14:04 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2023-03-17 18:47:10 +00:00
|
|
|
flatDir { dirs "lib" }
|
2020-01-06 21:14:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-03-17 18:47:10 +00:00
|
|
|
implementation libs.bouncycastle
|
|
|
|
implementation libs.glassfish.json
|
|
|
|
implementation libs.glassfish.jaxb.runtime
|
|
|
|
implementation libs.jcommander
|
2023-09-12 15:30:05 +00:00
|
|
|
implementation libs.jakarta.api
|
|
|
|
implementation libs.jakarta.xml
|
|
|
|
implementation libs.commons.codec
|
|
|
|
implementation libs.hibernate.core
|
|
|
|
implementation libs.jackson.databind
|
|
|
|
implementation 'org.apache.logging.log4j:log4j-core:2.19.0'
|
|
|
|
implementation libs.guava
|
2023-03-17 18:47:10 +00:00
|
|
|
// implementation libs.javax.json
|
|
|
|
// implementation libs.javax.jaxb
|
|
|
|
// implementation libs.javax.annotation
|
|
|
|
|
2023-09-12 15:30:05 +00:00
|
|
|
compileOnly libs.lombok
|
|
|
|
implementation libs.lombok
|
|
|
|
annotationProcessor libs.lombok
|
|
|
|
|
2023-03-17 18:47:10 +00:00
|
|
|
testImplementation libs.testng
|
2020-01-06 21:14:04 +00:00
|
|
|
}
|
|
|
|
|
2022-08-26 05:29:01 +00:00
|
|
|
test {
|
|
|
|
testLogging.showStandardStreams true
|
|
|
|
}
|
|
|
|
|
2020-01-06 21:14:04 +00:00
|
|
|
jar {
|
2023-03-17 18:47:10 +00:00
|
|
|
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.MF'
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
2020-01-06 21:14:04 +00:00
|
|
|
manifest {
|
2020-02-21 12:43:40 +00:00
|
|
|
attributes("Main-Class": "hirs.swid.Main",
|
2023-03-17 18:47:10 +00:00
|
|
|
'Class-Path':configurations.runtimeClasspath.files.collect { it.getName() }.join(' ')
|
2020-02-21 12:43:40 +00:00
|
|
|
)
|
2020-01-06 21:14:04 +00:00
|
|
|
}
|
2023-03-17 18:47:10 +00:00
|
|
|
//jar name format: [archiveBaseName]-[archiveAppendix]-[archiveVersion]-[archiveClassifier].[archiveExtension]
|
|
|
|
archiveVersion = jarVersion
|
2020-01-06 21:14:04 +00:00
|
|
|
}
|
|
|
|
|
2023-03-17 18:47:10 +00:00
|
|
|
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
|
2020-01-06 21:14:04 +00:00
|
|
|
}
|
2023-03-17 18:47:10 +00:00
|
|
|
|
|
|
|
buildDeb {
|
|
|
|
arch = 'amd64'
|
|
|
|
}
|
|
|
|
|