Files
spring-boot/test-support
Andy Wilkinson edc6fa3f28 Use temp directory when path of build directory is too long
Some gRPC-related tests fail on Windows when the path becomes too
long. The failure is somewhat cryptic:

> protoc: stdout: . stderr: --grpc_out: protoc-gen-grpc: The system cannot find the path specified.

The failure occurs when the path to the protoc-gen-grpc-java
executable gets too long. Our Gradle plugin's tests configure
TestKit to use a directory beneath spring-boot-gradle-plugin/build
and this can result in the path being too long.

This commit updates GradleBuild to use a directory beneath
java.io.tmpdir when the tests are running on Windows and the
absolute path of spring-boot-gradle-plugin/build 80 characters or
more in length.

Closes gh-51169
2026-07-31 13:16:06 +01:00
..