diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 870e0568ff..08c8a97a3c 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -25,6 +25,7 @@ ext { dependencies { checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}" implementation(platform("org.springframework:spring-framework-bom:5.3.15")) + implementation("com.tngtech.archunit:archunit:1.0.0") implementation("com.fasterxml.jackson.core:jackson-databind:2.11.4") implementation("commons-codec:commons-codec:1.13") implementation("org.apache.maven:maven-embedder:3.6.2") @@ -51,6 +52,10 @@ gradlePlugin { id = "org.springframework.boot.annotation-processor" implementationClass = "org.springframework.boot.build.processors.AnnotationProcessorPlugin" } + architecturePlugin { + id = "org.springframework.boot.architecture" + implementationClass = "org.springframework.boot.build.architecture.ArchitecturePlugin" + } autoConfigurationPlugin { id = "org.springframework.boot.auto-configuration" implementationClass = "org.springframework.boot.build.autoconfigure.AutoConfigurationPlugin" diff --git a/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java b/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java index decff985ca..e46d2c4180 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java @@ -48,6 +48,7 @@ import org.gradle.api.tasks.testing.Test; import org.gradle.testretry.TestRetryPlugin; import org.gradle.testretry.TestRetryTaskExtension; +import org.springframework.boot.build.architecture.ArchitecturePlugin; import org.springframework.boot.build.classpath.CheckClasspathForProhibitedDependencies; import org.springframework.boot.build.optional.OptionalDependenciesPlugin; import org.springframework.boot.build.testing.TestFailuresPlugin; @@ -61,8 +62,8 @@ import org.springframework.util.StringUtils; *