RFR: 8314486: JavaFX build uses deprecated features that will be removed in gradle 8 [v2]

Ambarish Rapte arapte at openjdk.org
Mon Oct 9 21:06:36 UTC 2023


> This is gradle only change, which fixes few warnings that are observed with gradle 7.6 and which eventually result to an error with gradle 8.3
> With this change the warnings get fixed and no error is observed with gradle 8.3
> Verified that several gradle tasks(all, sdk, javadoc, apps, shims, test) complete without any failure.
> 
> Warnings that are fixed:
> 1. The SourceDirectorySet.outputDir property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the classesDirectory property instead. See https://docs.gradle.org/7.6/dsl/org.gradle.api.file.SourceDirectorySet.html#org.gradle.api.file.SourceDirectorySet:outputDir for more details.
> -> As per this [7.x to 8.0 upgrade guide](https://docs.gradle.org/8.0/userguide/upgrading_version_7.html#sourcedirectoryset_api_cleanup) outputDir should be replaced with `destinationDirectory`
> 
> 2. The AbstractCompile.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the destinationDirectory property instead. Consult the upgrading guide for further information: https://docs.gradle.org/7.6/userguide/upgrading_version_7.html#compile_task_wiring
> -> As per the above doc, replacing `destinationDir` with `destinationDirectory` resolves the warning
> 
> 3. Various dependency warnings like one below:
> Gradle detected a problem with the following location: '<path>/rt/modules/javafx.base/build/module-classes'. Reason: Task ':base:modularJarStandaloneMac' uses this output of task ':base:buildModuleMac' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#implicit_dependency for more details about this problem.
> -> There are several such warning messages observed.
> -> Each warning required an explicit inclusion of dependency. All dependency changes are to fix this warning.
> 
> An easy way to review would be.
> 1. Build with gradle 7.6 (using  `--warning-mode all`  gradle option)
> 1.1 All above warnings can be observed and build completes successfully.
> 
> 2. Build with gradle 8.3 (using  `--warning-mode all`  gradle option)
> 2.1 Without this change build would fail citing above warnings as errors
> 2.2 With this change build completes successfully and above warnings do not occur

Ambarish Rapte has updated the pull request incrementally with one additional commit since the last revision:

  fix test failures and remove rest warnings

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

Changes:
  - all: https://git.openjdk.org/jfx/pull/1256/files
  - new: https://git.openjdk.org/jfx/pull/1256/files/14877233..fee55c79

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=1256&range=01
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=1256&range=00-01

  Stats: 28 lines in 1 file changed: 0 ins; 6 del; 22 mod
  Patch: https://git.openjdk.org/jfx/pull/1256.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1256/head:pull/1256

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


More information about the openjfx-dev mailing list