Skip to content

Conversation

Malax
Copy link
Member

@Malax Malax commented Sep 12, 2025

Summary

  • Adds a test case that sets org.gradle.vfs.watch=true in project gradle.properties to reproduce the incompatibility issue
  • Fixes build failures by explicitly disabling file system watching (org.gradle.vfs.watch=false) in the buildpack's GRADLE_USER_HOME/gradle.properties
  • Prevents the error: "Enabling file system watching via --watch-fs (or via the org.gradle.vfs.watch property) with --project-cache-dir also specified is not supported"

Context

The buildpack sets org.gradle.projectcachedir for caching, which is incompatible with Gradle's file system watching feature. When users have org.gradle.vfs.watch=true in their project gradle.properties, builds fail with an incompatibility error.

Solution

The buildpack now explicitly sets org.gradle.vfs.watch=false in its global gradle.properties configuration (GRADLE_USER_HOME/gradle.properties) to override any user project settings and prevent this conflict.

GUS-W-19626024

Adds a new test that explicitly sets the --watch-fs flag via
GRADLE_TASK environment variable to verify the buildpack
correctly handles this flag.
@Malax Malax requested a review from a team as a code owner September 12, 2025 16:38
@Malax Malax marked this pull request as draft September 12, 2025 16:38
Changes the test to set org.gradle.vfs.watch=true in gradle.properties
instead of using the --watch-fs command line flag.
Explicitly disable org.gradle.vfs.watch in buildpack gradle.properties
to prevent build failures when users have org.gradle.vfs.watch=true
in their project gradle.properties, which is incompatible with
org.gradle.projectcachedir.
@Malax Malax changed the title Add test case for --watch-fs Gradle flag Fix Gradle build failures when users enable file system watching Sep 12, 2025
@Malax Malax marked this pull request as ready for review September 12, 2025 17:14
@Malax Malax merged commit 5411fb1 into main Sep 12, 2025
6 checks passed
@Malax Malax deleted the malax/add-watch-fs-test-case branch September 12, 2025 17:21
@heroku-linguist heroku-linguist bot mentioned this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants