I'm trying to create and publish binary artifacts from an OpenAPI Spec to our internal Maven Repository.
First, I'm using the "org.openapi.generator" version 5.0.0-beta2 to generate an endpoint project from a spec. For example a Kotlin Spring service. Works fine, creates an entire gradle/kotlin project, with a build.gradle.kts file and a settings.gradle file.
If I navigate to that folder I can build that project just fine. I can also call that build from my original build to first generate the code and then build it.
I just don't know how to publish it. My publishing configuration is obviously not in the generated project, nor is there a maven-publish
plugin. Is there a way I can 'inject' these? Can I call some kind of 'include' on a build?
For myself, I generate the files to
$buildDir/generated/
and do what I want with the files in$buildDir/generated/src/main/kotlin
from my own build script ... such as:src/main/kotlin
(if that's important to you),I don't really even appreciate that the
openApiGenerate
task went to the trouble of preparing abuild.gradle
file instead of abuild.gradle.kts
file, with arguably out-dated dependencies ... it should mind its own business.