Browse Source

KAFKA-14198: Define separate configuration for Swagger (#12616)

Reviewers: Ismael Juma <ismael@juma.me.uk>
pull/12627/head
Chris Egerton 2 years ago committed by GitHub
parent
commit
e43e59fce1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      build.gradle

12
build.gradle

@ -2535,6 +2535,10 @@ project(':connect:json') { @@ -2535,6 +2535,10 @@ project(':connect:json') {
}
project(':connect:runtime') {
configurations {
swagger
}
archivesBaseName = "connect-runtime"
dependencies {
@ -2564,7 +2568,9 @@ project(':connect:runtime') { @@ -2564,7 +2568,9 @@ project(':connect:runtime') {
implementation libs.mavenArtifact
implementation libs.swaggerAnnotations
compileOnly libs.swaggerJaxrs2
// We use this library to generate OpenAPI docs for the REST API, but we don't want or need it at compile
// or run time. So, we add it to a separate configuration, which we use later on during docs generation
swagger libs.swaggerJaxrs2
testImplementation project(':clients').sourceSets.test.output
testImplementation project(':core')
@ -2653,9 +2659,9 @@ project(':connect:runtime') { @@ -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
buildClasspath = classpath
buildClasspath = classpath + configurations.swagger.asCollection()
outputFileName = 'connect_rest'
outputFormat = 'YAML'
prettyPrint = 'TRUE'

Loading…
Cancel
Save