Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Gradle wrapper to 8.6 #554

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Conversation

infotexture
Copy link
Member

@infotexture infotexture commented Mar 24, 2024

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 dita-ot/dita-ot#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 and pdf 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: dita-ot/dita-ot#4446.

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

Signed-off-by: Roger Sheen <[email protected]>
@infotexture infotexture added the build Ant/Gradle build scripts & CI/CD issues label Mar 24, 2024
@infotexture infotexture self-assigned this Mar 24, 2024
@infotexture
Copy link
Member Author

Gradle 8.7 was released the same day I started testing this.

Will repeat tests with the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Ant/Gradle build scripts & CI/CD issues
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant