-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Description
We've had a couple of issues in this area already:
- AOT processing does not work when Devtools is on the classpath #32517
- Native image built with Gradle fails to start when
spring-boot-devtools
is included as developmentOnly dependency #32843
The first was Maven-specific as, when using Gradle, the developmentOnly
configuration meant that DevTools wasn't on the classpath when performing AOT processing with Gradle. It was fixed by disabling DevTools during AOT processing. The second was Gradle-specific as developmentOnly
dependencies were only the classpath of the native image but they hadn't been processed ahead-of-time so a failure occurred when the native image was started.
With the first fix in place, a Maven-built native image will include DevTools but it'll be disabled. As such, its inclusion is benign other than bloating the image. That bloat is only ~145KB as far as I can tell, but we should eliminate it if we can by removing DevTools from the classpath.