External documentation for Gradle project dependencies

Answered

I'm working in a Gradle project and the "External Documentation" option isn't available. Quick documentation works (it uses with the sources jar rather than the docs jar). Note I'm talking about all dependencies (Spring etc) not just the JDK.

In Maven projects Intellij has an option to automatically load documentation (and sources). Is there a way to make this work with Gradle projects?

4
3 comments

Adding IDEA-specific stuff is ugly. I opened a ticket for this: https://youtrack.jetbrains.com/issue/IDEA-286107

1

For Gradle projects sources of the project library dependencies should be downloaded by default during the project import. If one needs a custom behaviour (for sources/javadoc), it can be configured in Gradle build file as per Gradle's documentation: https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html. This behaviour is by Gradle and IntelliJ IDEA's design.

If downloading by default does not work, there could be some reason/issue for this. Please check that sources and docs exist for the dependencies and the Gradle command line build for the project pulls them into local Maven repository or Gradle cache.

If issue remains, please clarify if sources/docs are available in local repository/cache. Attach idea.log file (use Help | Show Log in ... action to reveal it) after IDE restart and reproducing (Reload action in gradle tool window for the project). Thank you.

0

Please sign in to leave a comment.