Integrated: 8297042: gradle -PBUILD_SDK_FOR_TEST=false fails with gradle 7.6

Kevin Rushforth kcr at openjdk.org
Wed Nov 16 13:06:44 UTC 2022


On Tue, 15 Nov 2022 14:21:12 GMT, Kevin Rushforth <kcr at 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 at 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.

This pull request has now been integrated.

Changeset: 6cc9c4d1
Author:    Kevin Rushforth <kcr at openjdk.org>
URL:       https://git.openjdk.org/jfx/commit/6cc9c4d1b9a46432f1568a54d7dcdf51e224559b
Stats:     6 lines in 1 file changed: 0 ins; 6 del; 0 mod

8297042: gradle -PBUILD_SDK_FOR_TEST=false fails with gradle 7.6

Reviewed-by: arapte

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

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


More information about the openjfx-dev mailing list