diff --git a/spring-modulith-junit/src/main/java/org/springframework/modulith/junit/Changes.java b/spring-modulith-junit/src/main/java/org/springframework/modulith/junit/Changes.java index d09b6821..df327e8c 100644 --- a/spring-modulith-junit/src/main/java/org/springframework/modulith/junit/Changes.java +++ b/spring-modulith-junit/src/main/java/org/springframework/modulith/junit/Changes.java @@ -255,7 +255,13 @@ public class Changes implements Iterable { record OtherFileChange(String path) implements Change { private static final Collection CLASSPATH_RESOURCES = Set.of("src/main/resources", "src/test/resources"); - private static final Collection BUILD_FILES = Set.of("build.gradle", "build.kt", "pom.xml"); + private static final Collection BUILD_FILES = Set.of( + + // Gradle + "build.gradle", "build.gradle.kts", "gradle.properties", "settings.gradle", "settings.gradle.kts", + + // Maven + "pom.xml"); /** * Returns whether the change affects a build resource. diff --git a/spring-modulith-junit/src/test/java/org/springframework/modulith/junit/ChangesUnitTests.java b/spring-modulith-junit/src/test/java/org/springframework/modulith/junit/ChangesUnitTests.java index 644f3833..8c603986 100644 --- a/spring-modulith-junit/src/test/java/org/springframework/modulith/junit/ChangesUnitTests.java +++ b/spring-modulith-junit/src/test/java/org/springframework/modulith/junit/ChangesUnitTests.java @@ -49,7 +49,13 @@ class ChangesUnitTests { @TestFactory // GH-31 Stream detectsNonClasspathFileChange() { - var files = Stream.of("pom.xml", "build.gradle", "build.kt"); + var files = Stream.of( + + // Maven + "pom.xml", + + // Gradle + "build.gradle", "build.gradle.kts", "gradle.properties", "settings.gradle", "settings.gradle.kts"); return DynamicTest.stream(files, it -> it + " is considered build resource", it -> { diff --git a/src/docs/antora/modules/ROOT/pages/testing.adoc b/src/docs/antora/modules/ROOT/pages/testing.adoc index d5abaf5e..ae44432e 100644 --- a/src/docs/antora/modules/ROOT/pages/testing.adoc +++ b/src/docs/antora/modules/ROOT/pages/testing.adoc @@ -395,7 +395,7 @@ Tests will be selected for execution if they reside in either a root module, a m The optimization will back off optimizing the execution under the following circumstances: * The test execution originates from an IDE as we assume the execution is triggered explicitly. -* The set of changes contains a change to a resource related to a build system (`pom.xml`, `build.gradle`, `gradle.properties`). +* The set of changes contains a change to a resource related to a build system (`pom.xml`, `build.gradle(.kts)`, `gradle.properties`, and `settings.gradle(.kts)`). * The set of changes contains a change to any classpath resource. * The project does not contain a change at all (typical in a CI build).