-
Notifications
You must be signed in to change notification settings - Fork 40.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
additional-spring-configuration-metadata.json is not being merged when building with Gradle 4 #9732
Comments
For the record, this project does work with Gradle 3.x as far as I can see (and we don't support Gradle 4 officially in the 1.5.x line). I wonder if that's a regression in Gradle 4. Perhaps @wilkinsona knows? |
Ah, OK, let me try with Gradle 3
|
The problem's caused by Gradle changing the output location of classes in Gradle 4. The output location of resources has not changed which means that we fail to find the additional metadata file relative to the classes location. In Gradle < 4 the layout is like this:
With Gradle 4 it now looks like this:
Note the new |
From Gradle
|
Besides the workaround, is this something we can help to fix by the way? To not return to the old behavior and simply make this work with Gradle 4 as is? If so, what might be a good starting point to review and track changes? |
We can, and I think should, fix this in 1.5.x. There's a low-risk fix that can be applied: look for the resources folder one directory higher up if we don't find it where we're currently looking. There are actually some other problems with the current situation, but they're more complex and harder to fix. I'll open a separate issue for those as they'll have to wait for 2.0. |
Great, thanks. I'll put together a pull request. |
I've opened #9755 for the trickier problems. @mmoayyed Thanks very much. Just in case you haven't already spotted where the fix needs to be made, it's in |
Managed to get this working and tested it. First draft at #9758 |
Set up the simplest possible app according to the documentation wrt generating spring configuration metadata along with
additional-spring-configuration-metadata.json
for those additional "hints" to be merged into the main metadata file. It does not seem to work.https://github.com/dima767/additional-config-metadata-not-working
Try
./gradlew clean build
or./gradlew clean bootRun
This is Boot
1.5.4
and Gradle4.0
/cc @mmoayyed
The text was updated successfully, but these errors were encountered: