[aot repositories] Refresh AOT Metadata for Gradle Spring Boot project
AOT generated metadata and classes for spring Data repositories is used by the tools to show CodeLense over repositories methods. This data requires to be refreshed. This is working fine for Spring Boot Maven projects. The support for "Refresh AOT Metadata" is lacking for Gradle projects.
- VSCode. The
vscode-gradleextension has the command"gradle.runBuild". This command needs to support parameterets: gralde build file path string and gradle build command string. Currently this command asks the user to specify these parameters through the input via UI. The complication is to get to the root project from a build file path. - Eclipse command is mostly implemented (
org.springframework.tooling.ls.eclipse.commons.commands.ExecuteGradleTaskHandler). It needs to execute Gradle project refresh at the end manually unfortunately. TheprocessAottask execution results in creation of new source folders which only appear after Gradle Sync of the project... Perhaps there is something we could pass to the gradle built command to trigger that (???)
IMPORTANT The general downside for Gradle Spring Boot projects is that event implementing the 2 commands above properly it is not enough to have "Refresh AOT Metadata" to work flawlessly. The Gradle project case requires not only the org.springframework.boot plugin applied but also org.graalvm.buildtools.native. The processAot task is working properly only if both plugins are present. Therefore we need to see how to apply the plugin via the Gradle build command or not show the command if the Graal plugin is not applied.