Sources from mavenLocal not found
Hi,
I've been working with the OPENRNDR Kotlin-based framework for over a year now and there's one thing I still struggle with.
I work with 3 gradle based repos:
- openrndr (the core)
- orx (extensions adding functionality, depends on openrndr)
- openrndr-template (where I write my programs, depends on openrndr and orx)
I build the first two by running
./gradlew publishToMavenLocal -Prelease.version=0.4.0-SNAPSHOT
The issue: when I'm in openrndr-template and I control-click any methods provided by openrndr or orx, the decompiled version is shown. Then I need to click "Choose Sources...", wait for indexing, close the window, and ctrl+click again to see the sources. Periodically (maybe after rebuilding openrndr or orx, not sure) I need to repeat the process, as if it forgets where the sources were.
If I look inside ~/.m2/repository/org/openrndr/... the openrndr-???-0.4.0-SNAPSHOT-sources.jar files are there alright.
Why is Idea not finding these sources in mavenLocal? Is there any way to specify those local sources? Maybe in Idea or Gradle?
Please sign in to leave a comment.
Does it help to add
into the Gradle build scrip?
Thank you Andrey. I tried that yesterday but it did not seem to have an effect. Well, it did trigger downloading tons of packages, but the ctrl+click behaviour seemed unchanged, even after restarting Idea.
It could be related to the artifact layout that you deploy. Is it possible to have a complete project to reproduce - it would be very helpful! If not, can you provide a sample artifact and the build Gradle file that has the dependency on in? So that we would reproduce it here?
For uploading you can use https://uploads.jetbrains.com or any file sharing service. Thanks.
This is how to set it up:
As long as I don't enable the snapshot version in build.gradle.kts it works as expected (shows source code). But with snapshot enabled it decompiles instead.
Thank you! It appears to be a known issue: IDEA-252320. Please vote and follow it for updates.