On Tue, 15 Nov 2022 14:21:12 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

> This PR fixes our `build.gradle` script so it can work with gradle 7.6.
> 
> When doing a test build with gradle 7.6 RC3:
> 
> 
> $ gradle sdk
> $ gradle --info -PBUILD_SDK_FOR_TEST=false test
> 
> 
> We get the following error:
> 
> 
> FAILURE: Build failed with an exception.
> 
> * Where:
> Build file 'C:\Users\kcr\javafx\jfx-kcr\jfx\rt\build.gradle' line: 615
> 
> * What went wrong:
> A problem occurred evaluating root project 'rt'.
>> No signature of method: 
>> org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.useFilter() is 
>> applicable for argument types: 
>> (build_32ube911nql8mvr8torfp363j$_run_closure1) values: 
>> [build_32ube911nql8mvr8torfp363j$_run_closure1@1679a7fe]
> 
> 
> As noted in JBS, setting the gradle `-PBUILD_SDK_FOR_TEST=false` flag can be 
> used when running tests to avoid a complete build of the sdk.
> 
> The fix is to remove the use of `gradle.taskGraph.useFilter`, which is not 
> public API, but is an implementation detail that happened to "work" up until 
> recently, but stopped working some time between gradle 7.3 and gradle 7.6. I 
> say "work" in quotes, because there is effectively no difference in what gets 
> run because of the dependency on the shims.
> 
> The following two GHA test runs show the problem when running with gradle 7.6 
> RC3 and the fix:
> 
> [test-build-gradle-7.6](https://github.com/kevinrushforth/jfx/actions/runs/3470969280)
>  : test build run using gradle 7.6 RC3 without the fix from this PR; it fails 
> as expected
> [test-build-gradle-7.6+8297042](https://github.com/kevinrushforth/jfx/actions/runs/3470983142)
>  : test build run using gradle 7.6 RC3 without the fix from this PR; it 
> passes on all platforms
> 
> Additionally, the GHA test run for _this_ PR shows that it works fine with 
> gradle 7.3.

Verified on macOS Monterey with gradle 7.3 and 7.6.
Behavior looks unchanged with both.

-------------

Marked as reviewed by arapte (Reviewer).

PR: https://git.openjdk.org/jfx/pull/949

Reply via email to