Skip to content

Improve configuration cache compatibility (#39)#51

Open
Vampire wants to merge 1 commit intostevesaliman:masterfrom
Vampire:issue-39
Open

Improve configuration cache compatibility (#39)#51
Vampire wants to merge 1 commit intostevesaliman:masterfrom
Vampire:issue-39

Conversation

@Vampire
Copy link
Contributor

@Vampire Vampire commented Jan 13, 2026

This is a major improvement regarding issue #39, even though it does not fully fix it.

But at least with this change not each and every environment variable and system property becomes a CC input and thus rendering CC totally useless and just wasting time.

With this PR only the respectively prefixed variables and properties become CC inputs.

The used methods make the plugin requiring at least Gradle 7.5.
This could of course be guarded by some version check, depending on which Gradle version you want to maintain compatibility with.
Unfortunately, there is no functional test, that tests against actual Gradle version that should be lowest supported, and the documented compatibility of 2.1 is already wrong in 1.5.3 (#50).

So if older compatibility is wanted, a switch can be inserted (or mutliple variants published, but that is probably overkill here) to only use the new methods in new Gradle versions and keep the old logic in older ones.


The changes here should work fine as far as I have quickly tested in a play project.
But I have no idea whether the tests still work, because even in master I do not get the tests to run properly, they always fail with "Failed to set ORG_GRADLE_PROJECT_environmentProperty" no matter which Java version I tried to run them. (8, 11, 17, 21, ...) and there is no visible CI set up so far.

@Vampire
Copy link
Contributor Author

Vampire commented Jan 13, 2026

Ah, reverting the commit f8ce69d makes the tests run again and they still work with my changes.

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.

1 participant