ePages-de / ePages-de/restdocs-api-spec

Gradle Task Names Are Overloaded

Open
#158 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
427
Forks
116
Avg merge
23h 54m
Merged PRs (30d)
1

Description

Currently, the extension and task names added for the various specs (`openapi3`, etc) use the same names. This prevents using simple configuration syntax to do things like setting the generation task to `dependOn` (or being depended on) by other tasks, as Gradle first finds the extension and attempts to do task operations on it, which results in an error.

Currently, I am working around this with syntax such as:

```
tasks.all { task ->
if (task.name == 'openapi3') {
task.dependsOn
}
}
```

It would be helpful if the tasks were defined prior to the `afterEvaluate` step with unique names, following the pattern of other plug-ins, to allow better native interaction with them.

I recognize that changing the task name outright would represent a breaking change - I would propose creating the tasks with new unique names, but also creating empty tasks with the current names which "dependOn" the newly-named tasks as a potential way to address this prior to a major revision release, to avoid breaking anyone's existing use of the plug-in

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.