jitpack.io icon indicating copy to clipboard operation
jitpack.io copied to clipboard

Ability to download artifact's sources

Open rumatoest opened this issue 10 years ago • 6 comments

Hello.

As I can see my IDE is NOT able to download sources for artifact from JitPack. And sometimes looking into sources can be very helpful. BTW if I have sources with javadoc - then I can see this docs in while using auto completion. Are you planning to implement such feature or not?

Regards.

rumatoest avatar Dec 09 '15 18:12 rumatoest

Hi Rumato

It is up to each individual project to publish sources and needs to be configured in the build file. For example, in gradle you would do: https://github.com/jitpack/gradle-simple/blob/master/build.gradle#L17-L20 If the project publishes sources.jar then it will be available in the IDE. Completely agree with you that its useful but we can't always publish sources automatically. This is mainly because projects can have very different file layouts.

jitpack-io avatar Dec 10 '15 11:12 jitpack-io

If someone has library that creates sources jar by finding source files then we'll be happy to add it

jitpack-io avatar Dec 19 '15 13:12 jitpack-io

~~Don't you have the sources already? Since the jitpack.io docs mention a build step that happens inside your Docker boxes.~~ Now that I found the description of the build process, I see that it just runs the standard build tools and assumes that it can pick up the artifacts from the local Maven repo. I wouldn't use a library that searches for source files. That's going to be a miserable heuristics-based thing. I thought about hooking into the build tool and picking up the source path from there, but that's going to fail for some more exotic builds, so that's too the heuristics route. That's stuff for later, when Jitpack has developer hours to spare. (Who is "we", anyway? Right now, Jitpack has all the signs of a one-man show...)

toolforger avatar Dec 25 '15 22:12 toolforger

FWIW for Jenkins plugins the following sufficed: https://github.com/jenkinsci/plugin-pom/pull/37

jglick avatar Dec 21 '16 16:12 jglick

Can you please show how to correctly publish all project sources using Gradle in an Android library and in a Java/Kotlin library? I'm trying to Google around it seems it's needed someting more then just a Maven plugin and most of the stuff is outdated.

lamba92 avatar May 23 '18 00:05 lamba92

Although this is an old issue, or maybe I miss something - but I can't manage to get sources and/or javadoc into IntelliJ for EdwardRaff/JSAT, for example - even though it poblishes both: see buildscript.

In gradle 7.1, I have included it as dependency like this: implementation 'com.github.EdwardRaff:JSAT:master-SNAPSHOT' // using jitpack.io (don't worry, master-SNAPSHOT is for development only).

In the gradle cache, there is only a jar without sources/doc, and the docs-link dosen't work, either.

Any suggestions, how to have sources and docs in IntelliJ (2021.1) [Without changing the repo, as it's not mine.]?

Thanks.

brainbytes42 avatar Aug 05 '21 10:08 brainbytes42