-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Devtools documentation incorrectly uses compileOnly Gradle scope #14451
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
Comments
Well spotted, @douglyuckling . If only I'd remembered what I said in November 2016 when changing the docs in March 2018. |
Unfortunately, I don't think Gradle has a built-in configuration that meets our needs and I'm reluctant to start recommending the propdeps plugin again. I've asked on the Gradle Slack channel to see if that's anything I'm not aware of. If there is not then, given that we don't encourage people using a Spring Boot application as a dependency anyway, I'm tempted to just recommend that people use |
Yeah, I had a feeling this wouldn't simply be a documentation fix. 😉 I'm sure you'll get a good answer from the folks on the Gradle Slack channel, but here's my unsolicited opinion anyway: I think it would make sense for the Gradle plugin to add a custom configuration called (And my apologies if that solution has previously been proposed and rejected for some reason. I haven't researched the issue deeply.) |
Thanks for the suggestion. I'd considered customising the classpath of Daz DeBoer on the Gradle team has suggested a refinement though by inverting the extension. It looks as if a custom configuration that |
Daz's suggestion appears to work nicely. With a custom configuration set up like this:
And a dependency on DevTools declared like this:
This setup also has the advantage that DevTools doesn't end up on the test classpath (#5307) so in that respect the name |
If it's important that DevTools ends up in
True, but I'll point out that launching the main class directly from the IDE also doesn't get the classpath modifications made by |
It would not.
Indeed not, but that's not necessary when you're using an IDE as it'll "build" any changes to the resource so the DevTools finds them anyway.
No, I don't think so. If we can provide something that fits into the existing model that's served IDEs well, we won't place an unnecessary burden on the IDEs' developers and users will be able to use the new functionality as soon as we ship it, rather than waiting for a new version of their IDE to be available and for them to be able to upgrade to it. |
Ah, my apologies. I was thinking that
Oh, right, of course. :-) |
The Developer Tools section of the documentation says:
But the
compileOnly
configuration doesn't work for devtools, as noted by @wilkinsona in his comment on spring-io/initializr#128.The text was updated successfully, but these errors were encountered: