mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-18 20:47:58 +00:00
64 lines
1.3 KiB
Groovy
64 lines
1.3 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'checkstyle'
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
|
|
flatDir { dirs "lib" }
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.apache.commons:commons-lang3:3.13.0'
|
|
|
|
// testCompile libs.mockito
|
|
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.3'
|
|
testImplementation 'org.junit.platform:junit-platform-launcher:1.9.3'
|
|
testImplementation 'org.hamcrest:hamcrest:2.2'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
|
|
//publishing {
|
|
// publications {
|
|
// maven(MavenPublication) {
|
|
// artifactId 'hirs-structs'
|
|
// from components.java
|
|
// }
|
|
// }
|
|
//}
|
|
|
|
|