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:

Documentation for Zip tasks, giving no details except for the classname

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?

2 answers

  • answered 2018-07-12 09:34 Andrey

    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.

    When you create new project there is an option configure it: enter image description here

    After this documentation will appear when editing build.gradle file: enter image description here

  • answered 2018-07-12 14:50 Nate Glenn

    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-all flag 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.