C0urante commented on code in PR #12616:
URL: https://github.com/apache/kafka/pull/12616#discussion_r968366903
##########
build.gradle:
##########
@@ -2653,9 +2659,9 @@ project(':connect:runtime') {
}
task genConnectOpenAPIDocs(type:
io.swagger.v3.plugins.gradle.tasks.ResolveTask, dependsOn:
setVersionInOpenAPISpec) {
- classpath = sourceSets.main.compileClasspath +
sourceSets.main.runtimeClasspath
+ classpath = sourceSets.main.runtimeClasspath
Review Comment:
The plugin requires the `classpath` field to be set.
I also tried this:
```
classpath = sourceSets.main.runtimeClasspath +
configurations.swagger.asCollection()
buildClasspath = classpath
```
which led to a lot of these warnings:
> Gradle detected a problem with the following location... Reason: Task
':connect:runtime:genConnectOpenAPIDocs' uses this output of task
':connect:runtime:processResources' without declaring an explicit or implicit
dependency.
Based on [discussion in the
PR](https://github.com/apache/kafka/pull/12067#discussion_r892542837) that
introduced OpenAPI docs generation for Connect, it appears that setting
`classpath` to `sourceSets.main.runtimeClasspath` creates some implicit
dependencies for the `genConnectOpenAPIDocs` task that fix these warnings.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]