spring-attic / spring-native

Spring Native is now superseded by Spring Boot 3 official native support

Home Page:https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gradle AOT plugin removes generated sources that don't belong to it

edudar opened this issue · comments

I've been trying to figure out why my IDE does not recognize QueryDSL's Q classes. I see class files compiled from supposedly generated sources but no source files.

I found this issue #623 where the fix was to take everything in "generated" and remove it recursively. That seems to be quite an overstep by the AOT plugin as it removes sources generated by other tools.

I'd suggest removing sources that belong to the AOT plugin only, such as starting with aot like aotMain and aotTest

To verify that, I created an empty dir build/generated/testDir, started the build, and my dir was gone.

Sounds legit but as we focus on Spring Boot 3 native support, we prefer to use our bandwidth on this upcoming non-experimental support. I would suggest to double check that Spring Boot 3 snapshots provide the right behavior, you can create such project on https://start.spring.io/ and run for example mvn -Pnative package, should work out of the box with GraalVM 22.2 native-image installed locally.