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. ------------- Commit messages: - 8297042: gradle -PBUILD_SDK_FOR_TEST=false fails with gradle 7.6 Changes: https://git.openjdk.org/jfx/pull/949/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=949&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8297042 Stats: 6 lines in 1 file changed: 0 ins; 6 del; 0 mod Patch: https://git.openjdk.org/jfx/pull/949.diff Fetch: git fetch https://git.openjdk.org/jfx pull/949/head:pull/949 PR: https://git.openjdk.org/jfx/pull/949