diff --git a/build.gradle b/build.gradle
index 00847aebf23..2a4ebf14e6c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,10 +3,12 @@ plugins {
id 'org.springframework.boot' version '3.2.0'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.graalvm.buildtools.native' version '0.9.28'
- id 'io.spring.javaformat' version '0.0.40'
+ id 'io.spring.javaformat' version '0.0.41'
+ id "io.spring.nohttp" version "0.0.11"
}
apply plugin: 'java'
+apply plugin: 'checkstyle'
apply plugin: 'io.spring.javaformat'
gradle.startParameter.excludedTaskNames += [ "checkFormatAot", "checkFormatAotTest" ]
@@ -43,8 +45,35 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-docker-compose'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:mysql'
+ checkstyle 'io.spring.javaformat:spring-javaformat-checkstyle:0.0.41'
+ checkstyle 'com.puppycrawl.tools:checkstyle:10.12.5'
}
tasks.named('test') {
useJUnitPlatform()
}
+
+checkstyle {
+ configDirectory = project.file('src/checkstyle')
+ configFile = file('src/checkstyle/nohttp-checkstyle.xml')
+}
+
+checkstyleNohttp {
+ configDirectory = project.file('src/checkstyle')
+ configFile = file('src/checkstyle/nohttp-checkstyle.xml')
+}
+
+tasks.named("formatMain").configure { dependsOn("checkstyleMain") }
+tasks.named("formatMain").configure { dependsOn("checkstyleNohttp") }
+
+tasks.named("formatTest").configure { dependsOn("checkstyleTest") }
+tasks.named("formatTest").configure { dependsOn("checkstyleNohttp") }
+
+checkstyleAot.enabled = false
+checkstyleAotTest.enabled = false
+
+checkFormatAot.enabled = false
+checkFormatAotTest.enabled = false
+
+formatAot.enabled = false
+formatAotTest.enabled = false
diff --git a/pom.xml b/pom.xml
index 8a3d6f15123..cf47f8aa6df 100644
--- a/pom.xml
+++ b/pom.xml
@@ -198,10 +198,12 @@
validate
src/checkstyle/nohttp-checkstyle.xml
- src/checkstyle/nohttp-checkstyle-suppressions.xml
${basedir}
**/*
**/.git/**/*,**/.idea/**/*,**/target/**/,**/.flattened-pom.xml,**/*.class
+
+ config_loc=${basedir}/src/checkstyle/
+
check
diff --git a/src/checkstyle/nohttp-checkstyle-suppressions.xml b/src/checkstyle/nohttp-checkstyle-suppressions.xml
index 7c118a74fdb..f00599bb229 100644
--- a/src/checkstyle/nohttp-checkstyle-suppressions.xml
+++ b/src/checkstyle/nohttp-checkstyle-suppressions.xml
@@ -3,8 +3,9 @@
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
-
-
-
+
+
+
+
diff --git a/src/checkstyle/nohttp-checkstyle.xml b/src/checkstyle/nohttp-checkstyle.xml
index e6205127bfc..f886411e62d 100644
--- a/src/checkstyle/nohttp-checkstyle.xml
+++ b/src/checkstyle/nohttp-checkstyle.xml
@@ -4,4 +4,7 @@
"https://checkstyle.org/dtds/configuration_1_2.dtd">
+
+
+