The official docs at https://micronaut-projects.github.io/micronaut-openapi/latest/guide/index.html only describe how to add the -Dmicronaut.openapi.views.spec=...
compiler flag to the JavaCompile Gradle task:
tasks.withType(JavaCompile) {
options.fork = true
options.forkOptions.jvmArgs << '-Dmicronaut.openapi.views.spec=rapidoc.enabled=true,swagger-ui.enabled=true,swagger-ui.theme=flattop'
...
}
This task is not used though in a pure Kotlin project. I already tried tasks.withType(compileKotlin)
but without success.
Can anybody give me a hint how to pass the compiler flag in build.gradle
(still Groovy) for a pure Kotlin project?