2023-03-07 01:48:51 +00:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2024-02-02 13:07:08 +00:00
|
|
|
id 'checkstyle'
|
2023-03-07 01:48:51 +00:00
|
|
|
}
|
2023-03-17 18:47:10 +00:00
|
|
|
// Get version from main project gradle
|
2024-10-30 21:36:19 +00:00
|
|
|
def packVersion = properties.get("packageVersion")
|
|
|
|
def jarVersion = properties.get("jarVersion")
|
2023-03-17 18:47:10 +00:00
|
|
|
//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 {
|
2023-03-07 14:23:55 +00:00
|
|
|
implementation libs.bouncycastle
|
|
|
|
implementation libs.lombok
|
|
|
|
implementation libs.jackson.core
|
|
|
|
implementation libs.jackson.databind
|
|
|
|
implementation libs.jakarta.api
|
|
|
|
implementation libs.jakarta.xml
|
|
|
|
implementation libs.guava
|
|
|
|
implementation libs.commons.codec
|
|
|
|
implementation libs.commons.lang3
|
2023-07-13 21:47:49 +00:00
|
|
|
implementation libs.commons.io
|
2023-03-07 14:23:55 +00:00
|
|
|
implementation libs.minimal.json
|
2024-07-01 16:34:22 +00:00
|
|
|
implementation libs.pci
|
2023-03-07 14:23:55 +00:00
|
|
|
|
2023-03-07 01:48:51 +00:00
|
|
|
implementation 'org.apache.logging.log4j:log4j-core:2.19.0'
|
|
|
|
implementation 'org.apache.logging.log4j:log4j-api:2.19.0'
|
|
|
|
implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.1'
|
2024-08-14 22:51:39 +00:00
|
|
|
implementation 'org.slf4j:slf4j-simple:1.7.30'
|
2023-03-07 01:48:51 +00:00
|
|
|
|
2023-07-21 17:36:29 +00:00
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.3'
|
2023-07-13 21:47:49 +00:00
|
|
|
testImplementation 'org.junit.platform:junit-platform-launcher:1.9.3'
|
|
|
|
testImplementation 'org.hamcrest:hamcrest:2.2'
|
2023-11-16 17:51:30 +00:00
|
|
|
testImplementation 'org.mockito:mockito-core:4.2.0'
|
2024-08-14 22:51:39 +00:00
|
|
|
testImplementation project(path: ':HIRS_AttestationCA')
|
2023-11-16 17:51:30 +00:00
|
|
|
|
2023-03-07 01:48:51 +00:00
|
|
|
compileOnly libs.lombok
|
|
|
|
annotationProcessor libs.lombok
|
|
|
|
}
|
|
|
|
|
2024-02-02 13:07:08 +00:00
|
|
|
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 {
|
2024-10-30 21:36:19 +00:00
|
|
|
source = 'src/main/java'
|
2024-02-02 13:07:08 +00:00
|
|
|
}
|
|
|
|
checkstyleTest {
|
2024-10-30 21:36:19 +00:00
|
|
|
source = 'src/test/java'
|
2024-02-02 13:07:08 +00:00
|
|
|
}
|
|
|
|
tasks.withType(Checkstyle) {
|
|
|
|
reports {
|
|
|
|
xml.required = false
|
|
|
|
html.required = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-03-07 01:48:51 +00:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
2023-03-17 18:47:10 +00:00
|
|
|
jar {
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
manifest {
|
|
|
|
attributes(
|
2023-07-17 20:15:57 +00:00
|
|
|
'Class-Path': configurations.runtimeClasspath.files.collect { it.getName() }.join(' ')
|
|
|
|
)
|
2023-03-17 18:47:10 +00:00
|
|
|
}
|
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'
|
|
|
|
//}
|
2023-11-01 14:03:34 +00:00
|
|
|
//compileJava.dependsOn generateXjcLibrary
|