mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-27 16:28:57 +00:00
125 lines
2.6 KiB
Groovy
125 lines
2.6 KiB
Groovy
apply plugin: 'java'
|
|
apply plugin: 'findbugs'
|
|
apply plugin: 'checkstyle'
|
|
apply plugin: 'nebula.ospackage'
|
|
|
|
version = '1.0'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
compile project(':HIRS_Utils')
|
|
compile libs.jcommander
|
|
compile libs.commons_io
|
|
compile libs.log4j2
|
|
compileOnly libs.checkstyle
|
|
compileOnly libs.findbugs
|
|
testCompile libs.testng
|
|
}
|
|
|
|
ext.configDir = new File(projectDir, 'config')
|
|
ext.checkstyleConfigDir = "$configDir/checkstyle"
|
|
checkstyle {
|
|
toolVersion = '5.7'
|
|
configFile = checkstyleConfigFile
|
|
configProperties.put('basedir', checkstyleConfigDir)
|
|
ignoreFailures = false
|
|
showViolations = true
|
|
}
|
|
|
|
ext.findbugsConfigDir = "$configDir/findbugs"
|
|
|
|
findbugs {
|
|
toolVersion = '3.0.0'
|
|
ignoreFailures = false
|
|
effort = 'max'
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes("Main-Class": "hirs.tcg_eventlog.Main",
|
|
"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 {
|
|
repositories {
|
|
flatDir {
|
|
dirs "${buildDir}"
|
|
}
|
|
}
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath 'com.netflix.nebula:gradle-ospackage-plugin:4.9.3'
|
|
}
|
|
}
|
|
|
|
// Produce packages
|
|
ospackage {
|
|
packageName = 'tcg_eventlog_tool'
|
|
os = LINUX
|
|
arch = NOARCH
|
|
version = '2.0.0'
|
|
release = '1'
|
|
|
|
into '/opt/hirs/eventlog'
|
|
user 'root'
|
|
fileMode = 0755
|
|
|
|
from(jar.outputs.files) {
|
|
into 'lib'
|
|
}
|
|
from('lib') {
|
|
into 'lib'
|
|
}
|
|
from(configurations.runtime) {
|
|
into 'lib'
|
|
}
|
|
from('scripts') {
|
|
exclude {
|
|
FileTreeElement details ->
|
|
details.file.name.endsWith('.bat')
|
|
}
|
|
into 'scripts'
|
|
}
|
|
from('docs') {
|
|
exclude {
|
|
FileTreeElement details ->
|
|
details.file.name.endsWith('.odt')
|
|
}
|
|
into 'docs'
|
|
}
|
|
from('./') {
|
|
include {
|
|
FileTreeElement details ->
|
|
details.file.name.endsWith('.md')
|
|
}
|
|
into './'
|
|
link("/usr/local/bin/elt", "/opt/hirs/eventlog/scripts/eventlog.sh", 0x755)
|
|
}
|
|
|
|
into('/opt/hirs/default-properties/') {
|
|
fileMode 0664
|
|
from ('../../HIRS_Utils/src/main/resources/vendor-table.json') {
|
|
addParentDirs true
|
|
createDirectoryEntry true
|
|
}
|
|
}
|
|
|
|
buildRpm {
|
|
arch = I386
|
|
}
|
|
buildDeb {
|
|
arch = I386
|
|
}
|
|
} |