Exclude build directories from nohttp task

Before this commit, build directories were considered when running the
checkstyleNohttp Gradle task.

Given that many tasks write their outputs to the build directory, this
could lead to incorrect results being produced, depending on what order
the tasks are executed. As a result, Gradle will disable some build
optimizations, such as build caching, to ensure correctness.

After this commit, build directories are ignored by the
checkstyleNohttp task.
This commit is contained in:
Eric Haag
2024-01-02 11:51:13 -06:00
committed by Steve Riesenberg
parent d879d40299
commit f6b07f5649

View File

@@ -36,6 +36,6 @@ public class SpringNoHttpPlugin implements Plugin<Project> {
NoHttpExtension nohttp = project.getExtensions().getByType(NoHttpExtension.class);
File allowlistFile = project.getRootProject().file("etc/nohttp/allowlist.lines");
nohttp.setAllowlistFile(allowlistFile);
nohttp.getSource().exclude("buildSrc/build/**");
nohttp.getSource().exclude("**/build/**");
}
}