Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I attach a local javadoc folder to a project without an absolute path

I am trying to attach the source for android-support-v4 and have followed the instructions from this question:

How to install javadoc for Android Compatibility Package?

This project is shared on a git repo, so I don't want to checkin a .classpath pointing to a local folder.

What is the best way to point to this javadoc on a shared project? I am open to having everyone else generate the javadoc, but I need a way to point to each person's Android SDK directory. A solution that can checked into the repository would be better though.

Is there a variable I can use in the file path pointing to the javadoc folder? I am hoping for something like this: file:/$ANDROID_SDK_DIR$/extras/android/compatibility/v4/docs/

EDIT: I found a comment on the bug that pertains to an issue with javadocs and android libraries. I created the properties file and I can now see the javadocs in Eclipse, but I still have the same issue. The file contains an absolute path to my own Android SDK directory.

like image 234
Austyn Mahoney Avatar asked Nov 14 '22 04:11

Austyn Mahoney


1 Answers

I have figured out that in the new versions of ADT, you have to include a .properties file along with your jar in the libs folder. The normal way of changing the .classpath to point to docs/sources does not work in Eclipse with ADT, but this will.

If you have GSON in a file gson-2.2.2.jar create gson-2.2.2.jar.properties in the same folder

gson-2.2.2.jar.properties:

src=docs\\gson-2.2.2-sources.jar
doc=docs\\gson-2.2.2-javadoc.jar

Then create a docs folder inside libs and move your sources and javadoc jars into it.

This solves the issue where anything in /libs is compiled into your project. Only files in the root are included, so creating a folder for your docs (/libs/docs) is a great way to handle this.

like image 143
Austyn Mahoney Avatar answered Nov 16 '22 03:11

Austyn Mahoney