Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make IntelliJ IDEA open Gradle's own source code?

I'm working on a Gradle plugin. Sometimes I want to look at the source code or Javadocs of Gradle's own classes. I want to do it from IntelliJ IDEA, without having to open a separate application. That is, Ctrl+click or Ctrl+B on a Gradle method or class and have IntelliJ open the source code of Gradle itself.

I have tried everything from Attaching Gradle sources in IntelliJ IDEA :

  • adding wrapper { ... } block in build.gradle
  • file gradle/wrapper/gradle-wrapper.properties has distribution type all (and, to my knowledge, has never had other distribution type on this particular machine)

I have also tried attaching sources manually by downloading Gradle source code from GitHub, but IntelliJ doesn't seem to be able to ingest it.

In addition to that, I have tried standard troubleshooting remedies of IntelliJ:

  • Refresh Gradle project
  • File > "Invalidate Caches / Restart" > "Invalidate and Restart"

Yet, when I click on method project.getProperties() (as an example), IntelliJ IDEA opens decompiled Project.class instead of the source code file Project.java.

How to make IntelliJ IDEA open Gradle's own source code?

like image 699
andrybak Avatar asked Oct 16 '25 02:10

andrybak


1 Answers

Looks like you are facing this issue: IDEA-197970.

like image 113
Andrey Avatar answered Oct 17 '25 16:10

Andrey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!