Skip to content

Commit

Permalink
issue_863: upgrading this slowly but surely
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatSilentCoder committed Nov 25, 2024
1 parent ce78c75 commit 548c203
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 154 deletions.
24 changes: 1 addition & 23 deletions HIRS_AttestationCA/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id 'java'
id 'io.spring.dependency-management' version '1.1.0'
id 'com.google.protobuf' version '0.9.4'
id 'checkstyle'
}

java {
Expand Down Expand Up @@ -64,28 +63,7 @@ dependencies {
testCompileOnly libs.lombok
testAnnotationProcessor 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
}
}

protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.24.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ public abstract class UserDefinedEntity extends ArchivableEntity {

@Column(nullable = false, unique = true)
@NonNull
private String name;
private String name = "";

@ToString.Exclude
@Column(nullable = false, unique = false)
@Column(nullable = false)
@NonNull
private String description = "";

Expand Down
24 changes: 0 additions & 24 deletions HIRS_AttestationCAPortal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugins {
id 'com.netflix.nebula.ospackage' version '11.8.0'
id 'org.springframework.boot' version '3.0.6'
id 'io.spring.dependency-management' version '1.1.0'
id 'checkstyle'
}

// Get version from main project gradle
Expand Down Expand Up @@ -71,29 +70,6 @@ dependencies {
testAnnotationProcessor 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
}
}

test {
useJUnitPlatform()
}
Expand Down
24 changes: 0 additions & 24 deletions HIRS_Structs/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'java'
id 'checkstyle'
}

java {
Expand Down Expand Up @@ -34,29 +33,6 @@ 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) {
Expand Down
26 changes: 1 addition & 25 deletions HIRS_Utils/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'java'
id 'checkstyle'
}
// Get version from main project gradle
def packVersion = properties.get("packageVersion")
Expand Down Expand Up @@ -51,34 +50,11 @@ dependencies {
testImplementation libs.hamcrest
testImplementation libs.mockito.core
testImplementation project(path: ':HIRS_AttestationCA')

testCompileOnly libs.lombok
testAnnotationProcessor 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
}
}

test {
useJUnitPlatform()
}
Expand Down
23 changes: 21 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import java.util.concurrent.TimeUnit
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
id 'com.github.spotbugs' version '6.0.4' apply false
id 'com.github.spotbugs' version '6.0.4'
id 'checkstyle'
}

// Global checkstyle file
Expand All @@ -12,11 +13,29 @@ ext.checkstyleConfigFile = new File(rootDir, "/config/checkstyle/sun_checks.xml"
subprojects {
apply plugin: "com.github.spotbugs"

checkstyle {
toolVersion = '10.20.0'
configFile file("${rootDir}/config/checkstyle/checkstyle.xml")
}

checkstyleMain {
source = 'src/main/java'
}
checkstyleTest {
source = 'src/test/java'
}
tasks.withType(Checkstyle).configureEach {
reports {
xml.required = false
html.required = true
}
}

spotbugs {
excludeFilter = file('config/spotbugs/spotbugs-exclude.xml')
}

tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
tasks.withType(com.github.spotbugs.snom.SpotBugsTask).configureEach {
reports {
html.required = true
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
excludeGroups=rhel-6,performance
includeGroups=
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
org.gradle.jvmargs=-Xms512m -Xmx2048m
org.gradle.caching=true
22 changes: 11 additions & 11 deletions gradle/versions.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[versions]
bouncyCastleVersion = "1.77"
commonsCodecVersion = "1.15"
bouncyCastleVersion = "1.79"
commonsCodecVersion = "1.17.1"
commonsFileUploadVersion = "1.5"
commonsIoVersion = "2.4"
commonsLang3Version = "3.13.0"
commonsIoVersion = "2.18.0"
commonsLang3Version = "3.16.0"
gsonVersion = "2.10.1"
glassfishJakartaJsonVersion = "1.1.4"
glassfishJaxbRuntimeVersion = "2.3.1"
Expand All @@ -14,7 +14,7 @@ jakartaPersistenceApiVersion = "3.1.0"
jakartaServletVersion = "3.0.0"
jakartaXmlVersion = "4.0.0"
jcommanderVersion = "1.83"
log4jVersion = "2.19.0"
log4jVersion = "2.24.2"
lombokVersion = "1.18.34"
mariadbVersion = "3.1.4"
minimalJsonVersion = "0.9.5"
Expand All @@ -28,17 +28,17 @@ testngVersion = "7.4.0"
tomcatVersion = "10.1.5"

#test dependencies versions
hamcrestVersion = "2.2"
hamcrestVersion = "3.0"
hsqldbVersion = "2.7.3"
junitJupiterVersion = "5.9.3"
junitPlatformVersion = "1.9.3"
mockitoVersion = "4.2.0"
slf4jVersion = "1.7.30"
junitJupiterVersion = "5.11.3"
junitPlatformVersion = "1.11.3"
mockitoVersion = "5.14.2"
slf4jVersion = "2.0.16"
springTestVersion = "6.0.8"
spotBugAnnotationVersion = "4.8.6"

[libraries]
bouncycastle = { module = "org.bouncycastle:bcmail-jdk18on", version.ref = "bouncyCastleVersion" }
bouncycastle = { module = "org.bouncycastle:bcmail-jdk15to18", version.ref = "bouncyCastleVersion" }
commons-codec = { module = "commons-codec:commons-codec", version.ref = "commonsCodecVersion" }
commons-fileupload = { module = "commons-fileupload:commons-fileupload", version.ref = "commonsFileUploadVersion" }
commons-io = { module = "commons-io:commons-io", version.ref = "commonsIoVersion" }
Expand Down
21 changes: 0 additions & 21 deletions tools/tcg_eventlog_tool/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id "java"
id "com.netflix.nebula.ospackage" version "11.4.0"
id 'checkstyle'
}
// Get version from main project gradle
def packVersion = properties.get("packageVersion");
Expand All @@ -26,26 +25,6 @@ dependencies {

ext.configDir = new File(projectDir, 'config')

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'
}
tasks.withType(Checkstyle) {
reports {
xml.required = false
html.required = true
}
}

jar {
// Keep jar clean:
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.MF'
Expand Down
21 changes: 0 additions & 21 deletions tools/tcg_rim_tool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id "java"
id 'com.netflix.nebula.ospackage' version '11.4.0'
id 'com.intershop.gradle.jaxb' version '5.1.0'
id 'checkstyle'
}

// Get version from main project gradle
Expand Down Expand Up @@ -48,26 +47,6 @@ test {
testLogging.showStandardStreams true
}

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'
}
tasks.withType(Checkstyle) {
reports {
xml.required = false
html.required = true
}
}

jar {
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.MF'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
Expand Down

0 comments on commit 548c203

Please sign in to comment.