Skip to content

Clarify the role of snippetsDir as a task input and output #892

Closed
@galmegiz

Description

@galmegiz

In official Spring REST docs "Build configuration", there is a block that says

        "test {
                  outputs.dir snippetsDir
        }". //Configure the test task to add the snippets directory as an output.

In stackoverflow question

Wilkinson stated, "Setting the generated snippets directory as an output of the test task and an input of the Asciidoctor task allows Gradle to figure out task dependencies and perform accurate up-to-date checks."

I understand the intention behind that statement, but many people are interpreting test task block as defining the output directory for generated snippets, which is causing confusion and difficulties for them.(Many people mistakenly believe that they can change the snippet generation path by modifying outputs.dir.)

If the dependencies are properly managed through "depends on," I think the use of outputs.dir and becomes unnecessary in this case.

If that statement is not essential and can lead to confusion, it might be a good idea to remove it from the 'Spring Rest docs' manual. Indeed, since it is not intended to be a comprehensive guide on using Gradle, it may be appropriate to omit detailed instructions related to Gradle configuration from the manual. Or it would be beneficial to provide additional explanatory information to clarify the purpose and usage of outputs.dir.

In conclusion, I propose removing the "outputs.dir snippetsDir" phrase from the test task block in the manual.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions