mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-03-11 06:54:14 +00:00
added tcg_event_log tool build with rpm packaging [skip ci]
This commit is contained in:
parent
b5a66317d5
commit
ed5bf6f17a
@ -3,6 +3,7 @@ include ':HIRS_Utils'
|
|||||||
include ':HIRS_Structs'
|
include ':HIRS_Structs'
|
||||||
include ':TPM_Utils'
|
include ':TPM_Utils'
|
||||||
include ':HIRS_AttestationCA'
|
include ':HIRS_AttestationCA'
|
||||||
|
include ':tools:tcg_eventlog_tool'
|
||||||
|
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
versionCatalogs {
|
versionCatalogs {
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
apply plugin: 'java'
|
plugins {
|
||||||
apply plugin: 'findbugs'
|
id "java"
|
||||||
apply plugin: 'checkstyle'
|
id "nebula.ospackage" version "9.1.1"
|
||||||
apply plugin: 'nebula.ospackage'
|
}
|
||||||
|
|
||||||
version = '1.0'
|
version = '1.0'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -10,58 +9,26 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':HIRS_Utils')
|
implementation project(':HIRS_Utils')
|
||||||
compile libs.jcommander
|
implementation libs.jcommander
|
||||||
compile libs.commons_io
|
implementation libs.commons.io
|
||||||
compileOnly libs.checkstyle
|
|
||||||
compileOnly libs.findbugs
|
|
||||||
testCompile libs.testng
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.configDir = new File(projectDir, 'config')
|
ext.configDir = new File(projectDir, 'config')
|
||||||
ext.checkstyleConfigDir = "$configDir/checkstyle"
|
ext.checkstyleConfigDir = "$configDir/checkstyle"
|
||||||
checkstyle {
|
|
||||||
toolVersion = '5.7'
|
|
||||||
configFile = checkstyleConfigFile
|
|
||||||
configProperties.put('basedir', checkstyleConfigDir)
|
|
||||||
ignoreFailures = false
|
|
||||||
showViolations = true
|
|
||||||
}
|
|
||||||
|
|
||||||
ext.findbugsConfigDir = "$configDir/findbugs"
|
ext.findbugsConfigDir = "$configDir/findbugs"
|
||||||
|
|
||||||
findbugs {
|
|
||||||
toolVersion = '3.0.0'
|
|
||||||
ignoreFailures = false
|
|
||||||
effort = 'max'
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
// Keep jar clean:
|
||||||
attributes("Main-Class": "hirs.tcg_eventlog.Main",
|
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.MF'
|
||||||
"Class-Path": configurations.runtime.files.collect { "lib/$it.name" }.join(' ')
|
|
||||||
)
|
|
||||||
}
|
|
||||||
from(configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }) {}
|
|
||||||
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
|
|
||||||
}
|
|
||||||
|
|
||||||
uploadArchives {
|
manifest {
|
||||||
repositories {
|
attributes(
|
||||||
flatDir {
|
'Main-Class': 'hirs.tcg_eventlog.Main',
|
||||||
dirs "${buildDir}"
|
'Class-Path': configurations.runtimeClasspath.files.collect { it.getName() }.join(' ')
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.netflix.nebula:gradle-ospackage-plugin:4.9.3'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Produce packages
|
// Produce packages
|
||||||
ospackage {
|
ospackage {
|
||||||
@ -81,7 +48,7 @@ ospackage {
|
|||||||
from('lib') {
|
from('lib') {
|
||||||
into 'lib'
|
into 'lib'
|
||||||
}
|
}
|
||||||
from(configurations.runtime) {
|
from(configurations.runtimeClasspath) {
|
||||||
into 'lib'
|
into 'lib'
|
||||||
}
|
}
|
||||||
from('scripts') {
|
from('scripts') {
|
||||||
|
@ -5,4 +5,4 @@ scriptDir=$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")
|
|||||||
baseDir=${scriptDir%/*}
|
baseDir=${scriptDir%/*}
|
||||||
libDir=$baseDir"/lib/"
|
libDir=$baseDir"/lib/"
|
||||||
jar="tcg_eventlog_tool-1.0.jar";
|
jar="tcg_eventlog_tool-1.0.jar";
|
||||||
java -jar $libDir$jar "$@"
|
java -jar $libDir$jar "$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user