From ecec3f9c11e0fc545d07502809e918a5e522c0c1 Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Mon, 4 Nov 2024 17:31:54 -0700 Subject: [PATCH] saml2 Projects Are Not Using Formatter To continue to make progress on moving projects over to a local idp, Spring Java Format is disabled. This will allow for that investigation to happen in parallel. Issue gh-335 --- build.gradle | 8 ++++++++ servlet/spring-boot/java/saml2/custom-urls/build.gradle | 6 ------ servlet/spring-boot/java/saml2/login/build.gradle | 6 ------ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 6c03509..77c1fa9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,5 @@ +import io.spring.javaformat.gradle.tasks.Format + plugins { id "checkstyle" id "io.spring.javaformat" version "0.0.42" @@ -49,6 +51,12 @@ allprojects { tasks.matching { it.name == "checkstyleAotTest" }.all { task -> task.enabled = false } + + tasks.withType(Format).tap { + configureEach { + it.enabled = !it.identityPath.toString().contains("saml2") + } + } } if (hasProperty('buildScan')) { diff --git a/servlet/spring-boot/java/saml2/custom-urls/build.gradle b/servlet/spring-boot/java/saml2/custom-urls/build.gradle index 8767d55..3ba140c 100644 --- a/servlet/spring-boot/java/saml2/custom-urls/build.gradle +++ b/servlet/spring-boot/java/saml2/custom-urls/build.gradle @@ -15,12 +15,6 @@ repositories { sourceSets.main.java.srcDirs += "$projectDir/../identity-provider/src/main/java" sourceSets.main.resources.srcDirs += "$projectDir/../identity-provider/src/main/resources" -if (plugins.hasPlugin("io.spring.javaformat")) { - tasks.formatMain { - dependsOn(":servlet:spring-boot:java:saml2:identity-provider:formatMain") - } -} - dependencies { constraints { implementation "org.opensaml:opensaml-saml-api:5.1.3" diff --git a/servlet/spring-boot/java/saml2/login/build.gradle b/servlet/spring-boot/java/saml2/login/build.gradle index 8767d55..3ba140c 100644 --- a/servlet/spring-boot/java/saml2/login/build.gradle +++ b/servlet/spring-boot/java/saml2/login/build.gradle @@ -15,12 +15,6 @@ repositories { sourceSets.main.java.srcDirs += "$projectDir/../identity-provider/src/main/java" sourceSets.main.resources.srcDirs += "$projectDir/../identity-provider/src/main/resources" -if (plugins.hasPlugin("io.spring.javaformat")) { - tasks.formatMain { - dependsOn(":servlet:spring-boot:java:saml2:identity-provider:formatMain") - } -} - dependencies { constraints { implementation "org.opensaml:opensaml-saml-api:5.1.3"