We currently configure the classpath of the native image binary in response to the realization of a BuildNativeImageTask. I believe this is leading to Gradle being unable to determine the tasks which are responsible for building the additions to the classpath. This lack of dependency information then causes the execution optimisations to be disabled.

Rather than configuring things via a BuildNativeImageTask, we should be getting the binaries directly from GraalVmExtension and configuring the classpath independent of any task realisation.