Covers the same functionality as smallrye-open-api-maven-plugin
, but
as a Gradle plugin.
The plugin works, but only generates
The Gradle plugin build is integrated into the Maven build pretty much
as in the Quarkus project, roughly using the exec-maven-plugin
to
call the Gradle wrapper and then attach the artifacts generated by
Gradle to the Maven build.
To try this plugin in another project, perform a Maven build to
deploy to the local Maven repository (mvn clean install
), and tell
Gradle to resolve plugin dependencies in via the local Maven repository,
add the following snippet to your Gradle project's settings.gradle[.kts]
:
pluginManagement {
repositories {
gradlePluginPortal()
mavenLocal()
}
}
To make the plugin available to your build, add the following snippet(s)
to your Gradle project's settings.gradle[.kts]
:
includeBuild("FULL_PATH_TO_tools/gradle-plugin")
You can then use the plugin using the "standard" mechanisms in
build.gradle[.kts]
files like this:
plugins {
id("io.smallrye.openapi")
}
First deploy the plugin to your local Maven repository by issuing:
cd tools/gradle-plugin
./gradlew publishToMavenLocal
You use the plugin using the "standard" mechanisms in
build.gradle[.kts]
files like this:
plugins {
id("io.smallrye.openapi.gradleplugin") version "EXACT_VERSION_OF_THE_PROJECT"
}