GH-31 - Fix build resource file detection for test execution optimizations.
This commit is contained in:
@@ -255,7 +255,13 @@ public class Changes implements Iterable<Change> {
|
||||
record OtherFileChange(String path) implements Change {
|
||||
|
||||
private static final Collection<String> CLASSPATH_RESOURCES = Set.of("src/main/resources", "src/test/resources");
|
||||
private static final Collection<String> BUILD_FILES = Set.of("build.gradle", "build.kt", "pom.xml");
|
||||
private static final Collection<String> 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.
|
||||
|
||||
@@ -49,7 +49,13 @@ class ChangesUnitTests {
|
||||
@TestFactory // GH-31
|
||||
Stream<DynamicTest> 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 -> {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user