I’m trying to debug a gradle plugin i wrote by app...
# intellij
i
I’m trying to debug a gradle plugin i wrote by applying it to another project and running the build. The problem is that i can’t view the source code for it. Opening the plugin file shows what you see in the screenshot, and clicking on index just causes the tab to close, and subsequent opening of the plugin file hows no change. Here are the IJ logs for these actions
Copy code
2023-04-18 21:06:57,985 [21763066]   INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities to files
2023-04-18 21:06:58,421 [21763502]   INFO - #o.j.s.e.g.GradleProjectDependenciesModel - Collecting dependencies for publish-plugin:main
2023-04-18 21:06:58,422 [21763503]   INFO - #o.j.s.e.g.GradleProjectDependenciesModel - Collecting dependencies for publish-plugin:test
2023-04-18 21:06:58,460 [21763541]   INFO - #o.j.s.e.g.GradleProjectDependenciesModel - Collecting dependencies for plugin-github-actions:main
2023-04-18 21:06:58,460 [21763541]   INFO - #o.j.s.e.g.GradleProjectDependenciesModel - Collecting dependencies for plugin-github-actions:test
2023-04-18 21:07:49,849 [21814930]   INFO - #o.j.s.e.g.GradleProjectDependenciesModel - Collecting dependencies for plugin-github-actions:main
2023-04-18 21:07:49,850 [21814931]   INFO - #o.j.s.e.g.GradleProjectDependenciesModel - Collecting dependencies for plugin-github-actions:test
2023-04-18 21:08:42,167 [21867248]   INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities to files
2023-04-18 21:08:42,483 [21867564]   INFO - #o.j.s.e.g.GradleProjectDependenciesModel - Collecting dependencies for publish-plugin:main
2023-04-18 21:08:42,484 [21867565]   INFO - #o.j.s.e.g.GradleProjectDependenciesModel - Collecting dependencies for publish-plugin:test
2023-04-18 21:08:46,511 [21871592]   INFO - #c.i.w.i.i.EntitiesOrphanageImpl - Update orphanage. null modules added
2023-04-18 21:08:46,511 [21871592]   INFO - #c.i.w.i.i.WorkspaceModelImpl - Project model updated to version 19 in 2 ms: Marking sources to index...
2023-04-18 21:08:47,110 [21872191]   INFO - #o.j.s.e.g.GradleProjectDependenciesModel - Collecting dependencies for plugin-github-actions:main
2023-04-18 21:08:47,110 [21872191]   INFO - #o.j.s.e.g.GradleProjectDependenciesModel - Collecting dependencies for plugin-github-actions:test
The issue was that i didn’t add the sourcesJar when building the plugin, like so:
Copy code
java {
    withSourcesJar()
    withJavadocJar()
}