Using Gradle 7.4.2, spring boot gradle plugin and the buildInfo feature I have the following issue.
Log from Gradle:
Gradle detected a problem with the following location: 'xxx/build/build-info'. Reason: Task ':xxx:processResources' uses this output of task ':mas-mobile-account-component:bootBuildInfo' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
I believe the bootBuildInfo task should be review to introduce such dependency if processResources tasks is part of the build gradle.
Comment From: wilkinsona
By default, if you use the DSL to configure bootBuildInfo, the file it generates is written beneath the resources directory of the main source set's output. So, typically, the output location is build/resources/main/META-INF/build-info.properties. Judging by the error message above, you have configured the task to write to build/build-info which is a non-standard location. As such, I suspect that your problem may be caused by some misconfiguration in your own build.
If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.
Comment From: ghilainm
@wilkinsona I'll do it. My original trial was to keep the default location but that's even worse. You have then two tasks which are publishing to the same output directory which is not good for Gradle caching system. What are your thoughts on this?
Comment From: wilkinsona
We haven't seen any problems with the default configuration. Neither Boot's BuildInfo task nor Gradle's ProcessResources task are cached so I do not understand why it "is not good for Gradle caching system".
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: ghilainm
It shouldn't write to the same output as another task :). That's why it cannot use the Gradle cache system.