Missing Gradle JavaDoc in IDEA
I would like to view the JavaDocs for Gradle classes while I am editing a Gradle file in IntelliJ IDEA. I have the Gradle plugin installed (version 172.4572.19, up-to-date as far as I can tell) and the syntax highlighting works. I'm using Gradle 4.8.1 installed via
brew. When I try to view JavaDocs for the entity under my cursor, I get something like this:
As you can see, the class and package names are provided, but none of the JavaDoc is there. Furthermore, none of the methods for configuration are listed, making this near useless.
How do I get IDEA to show me more helpful and complete JavaDocs for entities in Gradle files?
You can add Gradle wrapper for project (after this enable it in IDE in Settings/Preferences | Build, Execution, Deployment | Build Tools | Gradle | Use default gradle wrapper (recommended)) and use Gradle distribution with sources.
In my case it turned out that my Gradle installation did not contain the javadocs at all!
When you install Gradle using Homebrew, as stated in the documentation you have to add the
--with-allflag if you want to install the javadocs. So you should install like this:
brew install gradle --with-all
Once this was done, I also had to reimport Gradle projects before IDEA would let me view JavaDocs.