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

Fix doc task dependencies #602

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Conversation

davidwheeler123
Copy link
Collaborator

The documentation project is failing with a gradle error

BUILD FAILED in 1m 2s
Error: Some problems were found with the configuration of task ':documentation:gitPublishCopy' (type 'Copy').
  - Gradle detected a problem with the following location: '/home/runner/work/pgjdbc-ng/pgjdbc-ng/documentation/build/docs/html5'.
    
    Reason: Task ':documentation:gitPublishCopy' uses this output of task ':documentation:asciidoctor' 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 ':documentation:asciidoctor' as an input of ':documentation:gitPublishCopy'.
      2. Declare an explicit dependency on ':documentation:asciidoctor' from ':documentation:gitPublishCopy' using Task#dependsOn.
      3. Declare an explicit dependency on ':documentation:asciidoctor' from ':documentation:gitPublishCopy' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.4/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
  - Gradle detected a problem with the following location: '/home/runner/work/pgjdbc-ng/pgjdbc-ng/documentation/build/javadoc'.
    
    Reason: Task ':documentation:gitPublishCopy' uses this output of task ':documentation:aggregateJavadocs' 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 ':documentation:aggregateJavadocs' as an input of ':documentation:gitPublishCopy'.
      2. Declare an explicit dependency on ':documentation:aggregateJavadocs' from ':documentation:gitPublishCopy' using Task#dependsOn.
      3. Declare an explicit dependency on ':documentation:aggregateJavadocs' from ':documentation:gitPublishCopy' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.4/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

This is likely due to the gradle upgrade recently made.

This PR is applying the "possible solution 1" by making the inputs to gitPublishCopy defined by the tasks themselves, rather than the output directories. This allows Gradle to see the dependencies between the tasks.

…olders) to make Gradle aware of the task dependencies
@kdubb
Copy link
Member

kdubb commented Jun 3, 2024

@davidwheeler123 👍

@davidwheeler123 davidwheeler123 merged commit 9422d82 into develop Jun 3, 2024
6 checks passed
@davidwheeler123 davidwheeler123 deleted the dw/fix_doc_task_dependencies branch June 3, 2024 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants