Currently org.springframework.boot.SpringBootVersion does a lot of work at runtime to get the version number. We should be able to make this a lot simpler by either putting it in a properties file or generate code at build time.

Comment From: wilkinsona

Does the new file need to be in every jar? I wonder if it could just go in the spring-boot jar?

Comment From: philwebb

Having played a bit with Graal I'm now not sure that putting it in a file is the right approach. It seems that you need to indicate which files are included, which isn't great.

I think we should look at the generated code approach instead. If we can make it work with IDEs we could generate SpringBootVersion and have the version hardcoded inside it. This also has the added benefit that no file loading is needed on the JVM.

Comment From: snicoll

It seems that you need to indicate which files are included, which isn't great.

That is correct and anything that goes in the direction of not doing that is, of course, better. That said, you'll get a contract that can be implemented to automatically register resource hints. The same can be said about a custom banner and that won't be a problem once the infrastructure lands in framework.

Comment From: wilkinsona

We should be able to generate some source code in a task that compileJava depends upon into a location that's added to the main source set's srcDirs.

To ensure a smooth IDE experience, https://blog.gradle.org/buildship-sync-task-exec should help on the Eclipse side of things. It may not be necessary to do anything for IntelliJ.