HIRS/HIRS_Utils/build.gradle

101 lines
2.5 KiB
Groovy
Raw Normal View History

2023-03-07 01:48:51 +00:00
plugins {
id 'java'
id 'checkstyle'
2023-03-07 01:48:51 +00:00
}
// Get version from main project gradle
def packVersion = properties.get("packageVersion")
def jarVersion = properties.get("jarVersion")
//println "packageVersion is ${projVersion}"
2023-03-07 01:48:51 +00:00
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
mavenCentral()
flatDir { dirs "lib" }
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
jaxb
}
dependencies {
implementation libs.bouncycastle
implementation libs.lombok
implementation libs.jackson.core
implementation libs.jackson.databind
implementation libs.jakarta.persistence.api
implementation libs.jakarta.xml
implementation libs.guava
implementation libs.commons.codec
implementation libs.commons.lang3
implementation libs.commons.io
implementation libs.minimal.json
implementation libs.pci
implementation libs.log4j.core
implementation libs.log4j.api
implementation libs.glassfish.jaxb.runtime
implementation libs.slf4j.simple
2023-03-07 01:48:51 +00:00
testImplementation libs.junit.jupiter
testImplementation libs.junit.platform.launcher
testImplementation libs.hamcrest
testImplementation libs.mockito.core
2024-08-14 22:51:39 +00:00
testImplementation project(path: ':HIRS_AttestationCA')
2023-03-07 01:48:51 +00:00
compileOnly libs.lombok
annotationProcessor libs.lombok
}
checkstyle {
toolVersion = '10.12.7'
configFile file("${rootDir}/config/checkstyle/checkstyle.xml")
}
// https://github.com/checkstyle/checkstyle/issues/14211#issuecomment-1884129948
configurations.checkstyle {
resolutionStrategy.capabilitiesResolution.withCapability("com.google.collections:google-collections") {
select("com.google.guava:guava:0")
}
}
checkstyleMain {
source = 'src/main/java'
}
checkstyleTest {
source = 'src/test/java'
}
tasks.withType(Checkstyle) {
reports {
xml.required = false
html.required = true
}
}
2023-03-07 01:48:51 +00:00
test {
useJUnitPlatform()
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes(
2023-07-17 20:15:57 +00:00
'Class-Path': configurations.runtimeClasspath.files.collect { it.getName() }.join(' ')
)
}
2023-07-17 20:15:57 +00:00
//jar name format: [archiveBaseName]-[archiveAppendix]-[archiveVersion]-[archiveClassifier].[archiveExtension]
archiveVersion = jarVersion
2023-05-03 18:44:14 +00:00
}
//task generateXjcLibrary(type:Exec) {
// workingDir 'config'
//
// commandLine './genXjcLibrary.sh'
//}
//compileJava.dependsOn generateXjcLibrary