diff --git a/build.gradle.kts b/build.gradle.kts index b02ee88ce790..5cccd22c5944 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,6 @@ import junitbuild.extensions.dependencyProject plugins { id("junitbuild.base-conventions") id("junitbuild.build-metadata") - id("junitbuild.checkstyle-nohttp") id("junitbuild.jacoco-aggregation-conventions") id("junitbuild.maven-central-publishing") id("junitbuild.temp-maven-repo") diff --git a/documentation/documentation.gradle.kts b/documentation/documentation.gradle.kts index 3fc54f95b223..ad59549e9e60 100644 --- a/documentation/documentation.gradle.kts +++ b/documentation/documentation.gradle.kts @@ -210,10 +210,6 @@ tasks { options.release.set(21) } - named("checkstyleTools") { - config = resources.text.fromFile(checkstyle.configDirectory.file("checkstyleMain.xml")) - } - val generateConsoleLauncherOptions by registering(CaptureJavaExecOutput::class) { classpath.from(standaloneConsoleLauncherClasspath) mainClass = "org.junit.platform.console.ConsoleLauncher" diff --git a/gradle/config/checkstyle/checkstyleMain.xml b/gradle/config/checkstyle/checkstyleMain.xml deleted file mode 100644 index eecf914bb4d4..000000000000 --- a/gradle/config/checkstyle/checkstyleMain.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gradle/config/checkstyle/checkstyleNohttp.xml b/gradle/config/checkstyle/checkstyleNohttp.xml deleted file mode 100644 index d1723372016d..000000000000 --- a/gradle/config/checkstyle/checkstyleNohttp.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/gradle/config/checkstyle/checkstyleTest.xml b/gradle/config/checkstyle/checkstyleTest.xml deleted file mode 100644 index 2e81cea24a3b..000000000000 --- a/gradle/config/checkstyle/checkstyleTest.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gradle/config/checkstyle/suppressions.xml b/gradle/config/checkstyle/suppressions.xml deleted file mode 100644 index e858ede7e5b1..000000000000 --- a/gradle/config/checkstyle/suppressions.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/gradle/config/eclipse/junit-eclipse-formatter-settings.xml b/gradle/config/eclipse/junit-eclipse-formatter-settings.xml deleted file mode 100644 index 974eadd7caa4..000000000000 --- a/gradle/config/eclipse/junit-eclipse-formatter-settings.xml +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gradle/config/eclipse/junit-eclipse.importorder b/gradle/config/eclipse/junit-eclipse.importorder deleted file mode 100644 index 56cb0619d774..000000000000 --- a/gradle/config/eclipse/junit-eclipse.importorder +++ /dev/null @@ -1,12 +0,0 @@ -#Organize Import Order -0=java -1=javax -2=jdk -3=aQute -4=junit -5=de -6=com -7=example -8=extensions -9=io -10=org diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 315271d4f123..04d9130a0093 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,6 @@ asciidoctorj-pdf = "2.3.19" asciidoctor-plugins = "4.0.4" # Check if workaround in documentation.gradle.kts can be removed when upgrading assertj = "3.27.3" bnd = "7.1.0" -checkstyle = "10.26.1" eclipse = "4.36.0" jackson = "2.19.1" jacoco = "0.8.13" @@ -32,7 +31,6 @@ archunit = { module = "com.tngtech.archunit:archunit-junit5", version = "1.4.1" assertj = { module = "org.assertj:assertj-core", version.ref = "assertj" } bndlib = { module = "biz.aQute.bnd:biz.aQute.bndlib", version.ref = "bnd" } -checkstyle = { module = "com.puppycrawl.tools:checkstyle", version.ref = "checkstyle" } classgraph = { module = "io.github.classgraph:classgraph", version = "4.8.180" } commons-io = { module = "commons-io:commons-io", version = "2.19.0" } errorProne-core = { module = "com.google.errorprone:error_prone_core", version = "2.40.0" } @@ -59,7 +57,6 @@ memoryfilesystem = { module = "com.github.marschall:memoryfilesystem", version = mockito-bom = { module = "org.mockito:mockito-bom", version = "5.18.0" } mockito-core = { module = "org.mockito:mockito-core" } mockito-junit-jupiter = { module = "org.mockito:mockito-junit-jupiter" } -nohttp-checkstyle = { module = "io.spring.nohttp:nohttp-checkstyle", version = "0.0.11" } nullaway = { module = "com.uber.nullaway:nullaway", version = "0.12.7" } openrewrite-recipe-bom = { module = "org.openrewrite.recipe:rewrite-recipe-bom", version = "3.11.1" } opentest4j = { module = "org.opentest4j:opentest4j", version.ref = "opentest4j" } diff --git a/gradle/plugins/common/src/main/kotlin/junitbuild.checkstyle-conventions.gradle.kts b/gradle/plugins/common/src/main/kotlin/junitbuild.checkstyle-conventions.gradle.kts deleted file mode 100644 index f207138111fe..000000000000 --- a/gradle/plugins/common/src/main/kotlin/junitbuild.checkstyle-conventions.gradle.kts +++ /dev/null @@ -1,15 +0,0 @@ -import junitbuild.extensions.requiredVersionFromLibs - -plugins { - base - checkstyle -} - -checkstyle { - toolVersion = requiredVersionFromLibs("checkstyle") - configDirectory = rootProject.layout.projectDirectory.dir("gradle/config/checkstyle") -} - -tasks.check { - dependsOn(tasks.withType()) -} diff --git a/gradle/plugins/common/src/main/kotlin/junitbuild.checkstyle-nohttp.gradle.kts b/gradle/plugins/common/src/main/kotlin/junitbuild.checkstyle-nohttp.gradle.kts deleted file mode 100644 index b993fedf65fe..000000000000 --- a/gradle/plugins/common/src/main/kotlin/junitbuild.checkstyle-nohttp.gradle.kts +++ /dev/null @@ -1,43 +0,0 @@ -import junitbuild.extensions.dependencyFromLibs -import junitbuild.extensions.requiredVersionFromLibs - -plugins { - id("junitbuild.checkstyle-conventions") -} - -dependencies { - checkstyle(dependencyFromLibs("nohttp-checkstyle")) -} - -configurations.checkstyle { - resolutionStrategy { - eachDependency { - // Workaround for CVE-2024-12798 and CVE-2024-12801 - if (requested.group == "ch.qos.logback") { - useVersion(requiredVersionFromLibs("logback")) - } - // Workaround for CVE-2025-48734 - if (requested.group == "commons-beanutils") { - useVersion("1.11.0") - } - } - } -} - -tasks.register("checkstyleNohttp") { - group = "verification" - description = "Checks for illegal uses of http://" - classpath = files(configurations.checkstyle) - config = resources.text.fromFile(checkstyle.configDirectory.file("checkstyleNohttp.xml")) - source = fileTree(layout.projectDirectory) { - exclude(".git/**", "**/.gradle/**") - exclude(".idea/**", ".eclipse/**") - exclude("**/*.class") - exclude("**/*.hprof") - exclude("**/*.jar") - exclude("**/*.jpg", "**/*.png") - exclude("**/*.jks") - exclude("**/build/**") - exclude("**/.kotlin") - } -} diff --git a/gradle/plugins/common/src/main/kotlin/junitbuild.java-library-conventions.gradle.kts b/gradle/plugins/common/src/main/kotlin/junitbuild.java-library-conventions.gradle.kts index a4e6b29209de..80f29fb514ca 100644 --- a/gradle/plugins/common/src/main/kotlin/junitbuild.java-library-conventions.gradle.kts +++ b/gradle/plugins/common/src/main/kotlin/junitbuild.java-library-conventions.gradle.kts @@ -12,7 +12,6 @@ plugins { idea id("junitbuild.base-conventions") id("junitbuild.build-parameters") - id("junitbuild.checkstyle-conventions") id("junitbuild.jacoco-java-conventions") id("org.openrewrite.rewrite") } @@ -305,11 +304,8 @@ afterEvaluate { } tasks { - checkstyleMain { - config = resources.text.fromFile(checkstyle.configDirectory.file("checkstyleMain.xml")) - } - checkstyleTest { - config = resources.text.fromFile(checkstyle.configDirectory.file("checkstyleTest.xml")) + check { + dependsOn(rewriteDryRun) } check { dependsOn(rewriteDryRun) @@ -317,9 +313,6 @@ tasks { } pluginManager.withPlugin("java-test-fixtures") { - tasks.named("checkstyleTestFixtures") { - config = resources.text.fromFile(checkstyle.configDirectory.file("checkstyleTest.xml")) - } tasks.named("compileTestFixturesJava") { options.release = extension.testJavaVersion.map { it.majorVersion.toInt() } } diff --git a/gradle/plugins/common/src/main/kotlin/junitbuild.jmh-conventions.gradle.kts b/gradle/plugins/common/src/main/kotlin/junitbuild.jmh-conventions.gradle.kts index 377a49fb9085..0099c490400d 100644 --- a/gradle/plugins/common/src/main/kotlin/junitbuild.jmh-conventions.gradle.kts +++ b/gradle/plugins/common/src/main/kotlin/junitbuild.jmh-conventions.gradle.kts @@ -13,10 +13,3 @@ dependencies { jmh(dependencyFromLibs("jmh-core")) jmhAnnotationProcessor(dependencyFromLibs("jmh-generator-annprocess")) } - -pluginManager.withPlugin("checkstyle") { - tasks.named("checkstyleJmh").configure { - // use same style rules as defined for tests - config = resources.text.fromFile(project.the().configDirectory.file("checkstyleTest.xml")) - } -} diff --git a/gradle/plugins/common/src/main/kotlin/junitbuild.shadow-conventions.gradle.kts b/gradle/plugins/common/src/main/kotlin/junitbuild.shadow-conventions.gradle.kts index 6962f80c3ca3..298d778dba99 100644 --- a/gradle/plugins/common/src/main/kotlin/junitbuild.shadow-conventions.gradle.kts +++ b/gradle/plugins/common/src/main/kotlin/junitbuild.shadow-conventions.gradle.kts @@ -31,9 +31,6 @@ tasks { javadoc { classpath += shadowedClasspath.get() } - checkstyleMain { - classpath += shadowedClasspath.get() - } shadowJar { configurations = listOf(shadowedClasspath.get()) exclude("META-INF/maven/**") diff --git a/platform-tests/platform-tests.gradle.kts b/platform-tests/platform-tests.gradle.kts index ae184107e8fc..87fa4040cd8c 100644 --- a/platform-tests/platform-tests.gradle.kts +++ b/platform-tests/platform-tests.gradle.kts @@ -134,9 +134,6 @@ tasks { named(processStarter.compileJavaTaskName).configure { options.release = javaLibrary.testJavaVersion.map { it.majorVersion.toInt() } } - named("checkstyle${processStarter.name.capitalized()}").configure { - config = resources.text.fromFile(checkstyle.configDirectory.file("checkstyleMain.xml")) - } } eclipse { diff --git a/platform-tooling-support-tests/platform-tooling-support-tests.gradle.kts b/platform-tooling-support-tests/platform-tooling-support-tests.gradle.kts index 1efd91be1780..61c617d4dde9 100644 --- a/platform-tooling-support-tests/platform-tooling-support-tests.gradle.kts +++ b/platform-tooling-support-tests/platform-tooling-support-tests.gradle.kts @@ -144,10 +144,6 @@ tasks.compileJava { } } -tasks.named("checkstyle${archUnit.name.capitalized()}").configure { - config = resources.text.fromFile(checkstyle.configDirectory.file("checkstyleTest.xml")) -} - tasks.check { dependsOn(archUnit) }