Skip to content

Improve task relocatability in Protobuf plugin#49842

Merged
wilkinsona merged 2 commits intospring-projects:mainfrom
erichaagdev:improve-build-relocatability
Apr 7, 2026
Merged

Improve task relocatability in Protobuf plugin#49842
wilkinsona merged 2 commits intospring-projects:mainfrom
erichaagdev:improve-build-relocatability

Conversation

@erichaagdev
Copy link
Copy Markdown
Contributor

Overview

This PR improves build cache relocatability by fixing cross-machine cache misses in the Detekt and Protobuf tasks. Previously, absolute paths were leaking into task inputs, causing unnecessary cache invalidation between different environments (e.g., CI servers vs. local developer machines).

Changes

Impact

Normalizing these inputs ensures both tasks are fully relocatable. This will maximize remote build cache hits and prevent duplicate work across environments.

References

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 30, 2026
@wilkinsona wilkinsona changed the title Improve task relocatability in Detekt and Protobuf plugins Improve task relocatability in Protobuf plugin Apr 7, 2026
@wilkinsona wilkinsona added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 7, 2026
@wilkinsona wilkinsona added this to the 4.1.x milestone Apr 7, 2026
@wilkinsona wilkinsona self-assigned this Apr 7, 2026
@wilkinsona wilkinsona force-pushed the improve-build-relocatability branch from 338b22e to 74fc7b2 Compare April 7, 2026 09:06
wilkinsona pushed a commit to erichaagdev/spring-boot that referenced this pull request Apr 7, 2026
Clears the `javaExecutablePath` on the Protobuf extension. This prevents
absolute Java installation paths from being tracked as task inputs,
avoiding cross-machine build cache misses and ensuring the task is fully
relocatable. This is safe because `protoc` and `grpc` are configured
to use native binaries rather than executable JARs.

See: google/protobuf-gradle-plugin#785

Signed-off-by: Eric Haag <ehaag@gradle.com>

See spring-projectsgh-49842
wilkinsona added a commit to erichaagdev/spring-boot that referenced this pull request Apr 7, 2026
wilkinsona added a commit to erichaagdev/spring-boot that referenced this pull request Apr 7, 2026
…utablePath"

See spring-projectsgh-49842

Signed-off-by: Andy Wilkinson <andy.wilkinson@broadcom.com>
@wilkinsona wilkinsona force-pushed the improve-build-relocatability branch from 74fc7b2 to bfd2c1b Compare April 7, 2026 09:06
erichaagdev and others added 2 commits April 7, 2026 10:17
Clears the `javaExecutablePath` on the Protobuf extension. This prevents
absolute Java installation paths from being tracked as task inputs,
avoiding cross-machine build cache misses and ensuring the task is fully
relocatable. This is safe because `protoc` and `grpc` are configured
to use native binaries rather than executable JARs.

See: google/protobuf-gradle-plugin#785

Signed-off-by: Eric Haag <ehaag@gradle.com>

See spring-projectsgh-49842
…utablePath"

See spring-projectsgh-49842

Signed-off-by: Andy Wilkinson <andy.wilkinson@broadcom.com>
@wilkinsona wilkinsona force-pushed the improve-build-relocatability branch from bfd2c1b to bd72e50 Compare April 7, 2026 09:17
@wilkinsona wilkinsona modified the milestones: 4.1.x, 4.1.0-RC1 Apr 7, 2026
@wilkinsona wilkinsona merged commit e04a21c into spring-projects:main Apr 7, 2026
3 checks passed
@wilkinsona
Copy link
Copy Markdown
Member

Thanks, @erichaagdev. The Detekt changes are applicable to 3.5.x and later so I'll apply those separately.

@erichaagdev erichaagdev deleted the improve-build-relocatability branch April 7, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: task A general task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants