Gradle maven dependencies not downloading javadoc and sources in Android Studio

8,944 views
Skip to first unread message

Raúl Muñoz Benavente

unread,
Jul 2, 2013, 8:14:34 AM7/2/13
to adt...@googlegroups.com
I also tried adding this to build.gradle:


apply plugin: 'idea'

idea {
    module {
        downloadJavadoc = true
        downloadSources = true
    }
}

But with no effect, only the library jar is downloaded by gradle, but not the javadoc and sources jars.

There is a post in stackoverflow about this:

But I have had no luck with it.

Thanks

Xavier Ducrohet

unread,
Jul 25, 2013, 6:35:34 PM7/25/13
to adt...@googlegroups.com
I don't think Gradle handles this at this point. I've talked to the devs and they are aware of it. We're looking at adding a hook in Gradle so that we can do it when the tooling API queries the model.


--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

Raúl Muñoz Benavente

unread,
Jul 26, 2013, 7:10:58 AM7/26/13
to adt...@googlegroups.com
Thanks for the input. It is really a pleasure to work with the IDE having access to javadocs and sources, so I am looking forward to seeing this feature implemented in Gradle / Android Studio.

Ankush Gupta

unread,
Jan 8, 2014, 3:20:30 PM1/8/14
to adt...@googlegroups.com
Has there been an update to this?

Xavier Ducrohet

unread,
Jan 8, 2014, 7:35:22 PM1/8/14
to adt...@googlegroups.com
no.

John Johnson

unread,
May 11, 2014, 4:01:27 AM5/11/14
to adt...@googlegroups.com
Thanks for keeping us updated on the ongoing status of the development regarding this issue.  Please post back when a resolution is available to this issue.

Tomi Urankar

unread,
Sep 9, 2014, 12:51:11 PM9/9/14
to adt...@googlegroups.com, raul.munoz...@gmail.com
Any news?

Tomáš Procházka

unread,
Sep 9, 2014, 4:55:23 PM9/9/14
to adt...@googlegroups.com, raul.munoz...@gmail.com
Did anyone try to report it directly to Jetbrains already?
This is mostly common Gradle support problem, not related to Android itself.


Dne úterý, 2. července 2013 14:14:34 UTC+2 Raúl Muñoz Benavente napsal(a):

Tomáš Procházka

unread,
Sep 18, 2014, 3:12:40 PM9/18/14
to adt...@googlegroups.com, raul.munoz...@gmail.com
I just created report here http://youtrack.jetbrains.com/issue/IDEA-130028

Dne úterý, 9. září 2014 22:55:23 UTC+2 Tomáš Procházka napsal(a):

Tomáš Procházka

unread,
Oct 9, 2014, 3:50:52 PM10/9/14
to adt...@googlegroups.com
So no, it is not common IDEA gradle implementation problem.
It works correctly for all jar dependencies, problem is only with AAR.

It's because Android Studio open classes from this location
build/intermediates/exploded-aar
And IDEA has no information about source code for files in this location.
Android studio should setup source location for the exploded-aar to the gradle local cache

Like:
c:\Users\UserName\.gradle\caches\modules-2\files-2.1\de.keyboardsurfer.android.widget\crouton\1.8.5\368f18883b398d7ee334ca3e6c43cf182b2058e2\crouton-1.8.5-sources.jar

Exist issue ticked with this problem in your issue tracker?

Joshua Deffibaugh

unread,
Oct 14, 2014, 7:29:11 PM10/14/14
to adt...@googlegroups.com
This seems like the correct approach to me as well.  Could 3rd party plugin be made for now?

Daniele Segato

unread,
Nov 18, 2014, 11:32:07 AM11/18/14
to adt...@googlegroups.com
Hi Xavier / All,

As far as I've understood the current situation is this:
- Works with AAR only if both the AAR and the sources are available on a maven server
- Works with Jar only if both the jar and its sources are available on a maven server
- Doesn't work with Javadoc only (no sources), not even with Jars
- Doesn't work locally (including the jar in the libs/ directory)

Does this look a fair picture of the current situation or am I wrong?

In previous versions I was able to manually add the javadoc even if my confing would then be overridden by Android Studio at the next sync. Now this is not possible anymore and  I'm stack at switching to a browser to read the javadoc of the libraries I use.

Setting
idea {
    module {
        downloadJavadoc = true
        downloadSources = true
    }
}
DOES make intellij download the javadoc if available but it then do not pick it up.

Does anyone know of a workaround? I really need the javadoc in the IDE to speed up the development. Thank you.

Thank you very much,
Daniele

Tomáš Procházka

unread,
Nov 19, 2014, 4:24:25 AM11/19/14
to adt...@googlegroups.com
IDEA is able to download and display sources or javadoc fot gradle dependencies. 
Only problem is with AAR, IDEA doesn't understand it.
And I also think that it should be fixed, because it is really pain code without javadoc

Daniele Segato

unread,
Nov 19, 2014, 5:06:16 AM11/19/14
to adt...@googlegroups.com, tomas.p...@atomsoft.cz
Hi Tomáš,

I experienced the issue with Javadoc with a JAR file on maven (it's not maven central, it's my company artifactory).

Are you saying this is supposed to work in Android Studio?
If that's the case I either encounter a bug or am doing something wrong.

Thanks.

Brian Hoffmann

unread,
Jan 20, 2015, 3:02:56 AM1/20/15
to adt...@googlegroups.com, tomas.p...@atomsoft.cz
Hi,

I just stumbled upon this: https://github.com/xujiaao/AARLinkSources

Andreas Scheucher

unread,
Mar 18, 2015, 5:56:39 PM3/18/15
to adt...@googlegroups.com, raul.munoz...@gmail.com
There is an issue entry existing already.

Go there and vote for it!


Hope this will be fixed soon.
Reply all
Reply to author
Forward
0 new messages