micronaut-projects / micronaut-gradle-plugin

A Gradle Plugin for Micronaut
Apache License 2.0
66 stars 43 forks source link

dockerfileNative task should mention graal annotation processor #160

Open jamcole opened 3 years ago

jamcole commented 3 years ago

Not sure if this should be on the task help output, a warning, or in the docs, but if you're using the micronaut openapi generation and a standalone docker file for your builds (our CI environment requires this), you have to update the resource-config.json for the resource files.

This is done automatically by the dockerBuildNative task by dynamically adding the micronaut-graal annotation processor, but was pretty challenging to figure out as a person new to graalvm.

The prerequisite to make things work as espected in standalone native-image dockerfile builds is to add the following annotation to your build.gradle: annotationProcessor("io.micronaut:micronaut-graal:$micronautVersion")

melix commented 2 years ago

Can you check if you still have the same problem with the latest release, and if so, share a minimal reproducer?