Navigating to Gradle plugin source in debugger

In IntelliJ 2018.2.1 EAP Ultimate, I am debugging a Gradle Wrapper 4.9 build that uses the Gradle Kotlin plugin 1.2.60.

Nothing happens when I try to "Jump To Source" from the Variables tab to instances of classes from the Kotlin plugin.

Is there some way to be able to view the source for the Kotlin plugin from the debugger?

If there's no solution that isn't an ugly hack, I'll file a bug / feature request on YouTrack.

8 comments
Comment actions Permalink

There is indeed an issue with the source resolving of the kotlin libraries in the context of the gradle build script (Groovy DSL). I'm afraid there is no simple workarounds right now, please file an issue request for the support. Thanks!

1
Comment actions Permalink

Thanks. Does this issue only occur for the Kotlin plugin, or does it occur for all plugins?

0
Comment actions Permalink

If I understand you correctly, only kotlin sources (*.kt files) can not be resolved for gradle groovy build scripts. So, it affects gradle plugins written in kotlin and other plugins if it has kotlin libraries dependencies.

0
Comment actions Permalink

I don’t know if the source for the classes to which I can’t navigate is Kotlin or Java (or any other JVM language, for that matter). All I know is that the ByteCode is part of the Kotlin plugin for Gradle. Are you just guessing that IntelliJ fails to load `.kt`, and only `.kt`, files from any Gradle plugin’s source, or have you actually done tests, or seen others’ tests, that confirm that is causing the symptoms I see? I just want to make my bug report accurate, so I don’t waste JetBrains dev’s time with potentially erroneous diagnoses of root causes of the symptoms I’ve seen.

0
Comment actions Permalink

There were some complains about kotlin classes usage inside gradle build scripts. I've filled the issue request at https://youtrack.jetbrains.com/issue/IDEA-196892 . Feel free to attach the simple project sample to illustrate the issue you've seen.

0
Comment actions Permalink

I’m actually using the Gradle Kotlin DSL, not the Groovy DSL. I much prefer static languages over dynamic ones.

0
Comment actions Permalink

Then it's a different issue, please file a separate ticket with the sample project attached.

0
Comment actions Permalink

I filed a broader request for debugging to support navigating to the source of plugins from the Gradle Plugin Portal, since this doesn't seem to be limited to the Kotlin plugin:

https://youtrack.jetbrains.com/issue/IDEA-221322

0

Please sign in to leave a comment.