Skip to content

Exclude build output directories from nohttp source set#18928

Merged
rwinch merged 2 commits intospring-projects:mainfrom
ribafish:gk/fix-checkstyleNohttp-caching
Mar 18, 2026
Merged

Exclude build output directories from nohttp source set#18928
rwinch merged 2 commits intospring-projects:mainfrom
ribafish:gk/fix-checkstyleNohttp-caching

Conversation

@ribafish
Copy link
Contributor

@ribafish ribafish commented Mar 18, 2026

Summary

  • The checkstyleNohttp task scans the entire project tree for non-HTTPS URLs
  • Without excluding **/build/**, subproject build output directories generated during the first build become additional source inputs for subsequent builds
  • This changes the cache key and causes cache misses when using the Gradle build cache
  • Adds **/build/** to the nohttp source exclusion list alongside the existing buildSrc/build/** exclusion

Test plan

  • Verify checkstyleNohttp still runs correctly (the excluded directories only contain build outputs, not source files)
  • Verify cache hit on consecutive builds with --build-cache

Tested that caching now works for all cases here: https://github.com/gradle/develocity-oss-projects/actions/runs/23246860010

ribafish added a commit to gradle/develocity-oss-projects that referenced this pull request Mar 18, 2026
The :checkstyleNohttp task's source set includes build output directories,
causing cache misses between consecutive builds (experiment 2). The nohttp
source set scans **/build/** which changes between build 1 and build 2.

Upstream fix: spring-projects/spring-security#18928

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 18, 2026
ribafish and others added 2 commits March 18, 2026 14:27
The checkstyleNohttp task scans the entire project tree for non-HTTPS
URLs. Without excluding **/build/**, subproject build output directories
generated during the first build become additional source inputs for
subsequent builds, changing the cache key and causing cache misses.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gasper Kojek <gkojek@gradle.com>
The kerberos-client/target and kerberos-test/target directories contain
.keytab files generated during test execution. These directories only
exist after the first build, causing a cache miss for checkstyleNohttp
in subsequent builds since the source input set changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Gasper Kojek <gkojek@gradle.com>
@ribafish ribafish force-pushed the gk/fix-checkstyleNohttp-caching branch from 3ca23bb to 750aeea Compare March 18, 2026 13:28
@rwinch rwinch enabled auto-merge (rebase) March 18, 2026 14:27
@rwinch
Copy link
Member

rwinch commented Mar 18, 2026

Thank you for the PR @ribafish I've marked this to be merged as soon as the build passes

@rwinch rwinch self-assigned this Mar 18, 2026
@rwinch rwinch added in: build An issue in the build type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 18, 2026
@rwinch rwinch added this to the 7.1.0-RC1 milestone Mar 18, 2026
@rwinch rwinch merged commit 14d469c into spring-projects:main Mar 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: build An issue in the build type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants