mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 20:19:06 +00:00
There are two problems with the current approach: 1. The DSL uses dependsOn to try to inform Gradle of the dependency relationship between tasks. This isn't recommended and inputs and outputs should be used instead. 2. The generated build-info.properties file doesn't appear on the classpath when running an application in an IDE, unless that IDE delegates the execution to Gradle. This commit addresses both of these shortcomings by configuring the bootBuildInfo task's output to be a src dir of the main source set's resources. This gives Gradle the preferred input- and output-based view of the tasks' interdependencies. It also causes the generated build-info.properties to appear on the classpath in IDEs that don't delegate to Gradle. For example, the Eclipse Buildship plugin automatically configures build/bootBuildInfo as a source folder on the project's build path. Closes gh-49547