docs
docs copied to clipboard
Update Gradle wrapper to 8.6
Description
Update Gradle distribution version & regenerate wrapper to pick up recent changes per https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper
./gradlew wrapper --gradle-version 8.6
./gradlew wrapper --gradle-version 8.6
https://docs.gradle.org/8.6/release-notes.html
Motivation and Context
Potential fix for https://github.com/dita-ot/dita-ot/issues/4426, which reports errors when running the currently included Gradle wrapper version 7.6.1 with Java 21.
How Has This Been Tested?
- Created fresh worktree in core repo
- Updated Gradle wrappers in both core and docs repos to version 8.6
- Tested with Java 17 and Java 21
Results
- ✅ Java 17 builds completed successfully
- ❌ Java 21 builds throw implicit dependency errors
(as if
html
andpdf
tasks each depend on one another — even though they don't).
Show Gradle error details
> Task :pdf FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Some problems were found with the configuration of task ':pdf' (type 'DitaOtTask').
- Gradle detected a problem with the following location:
'/…/dita-ot.dist.worktree.g86.j21/build/tmp/dist/doc'.
Reason: Task ':html' uses this output of task ':pdf' without declaring an explicit
or implicit dependency. This can lead to incorrect results being produced,
depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':pdf' as an input of ':html'.
2. Declare an explicit dependency on ':pdf' from ':html' using Task#dependsOn.
3. Declare an explicit dependency on ':pdf' from ':html' using Task#mustRunAfter.
For more information, please refer to
https://docs.gradle.org/8.6/userguide/validation_problems.html#implicit_dependency
in the Gradle documentation.
- Gradle detected a problem with the following location:
'/…/dita-ot.dist.worktree.g86.j21/build/tmp/dist'.
Reason: Task ':pdf' uses this output of task ':html' without declaring an explicit
or implicit dependency. This can lead to incorrect results being produced,
depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':html' as an input of ':pdf'.
2. Declare an explicit dependency on ':html' from ':pdf' using Task#dependsOn.
3. Declare an explicit dependency on ':html' from ':pdf' using Task#mustRunAfter.
Note To test, the wrappers must be updated in both core & docs repos. See corresponding PR in core repo: https://github.com/dita-ot/dita-ot/pull/4446.
Gradle 8.7 was released the same day I started testing this.
Will repeat tests with the latest version.