1

we are creating an Android library and want enable our users to see the Javadoc in AndroidStudio/Intellij.

To test this I published the javadoc and sources to nexus and everything worked fine. But actually I don't want to provide our sources to every user, as it is no OS project.

But without the sources I was not able to to get any javadoc shown.

Can anyone help me?

Additional Information:

When I deploy only the Javadoc AndroidStudio does not recognize them. The xml under ".idea/libraries/" looks the following:

<component name="libraryTable">
  <library name="adapter-0.4.324">
    <CLASSES>
      <root url="jar://$USER_HOME$/.android/build-cache/77393c6313510bd47cb4d4c9344c0d5fea59b1a0/output/jars/classes.jar!/" />
      <root url="file://$USER_HOME$/.android/build-cache/77393c6313510bd47cb4d4c9344c0d5fea59b1a0/output/res" />
    </CLASSES>
    <JAVADOC />
    <SOURCES />
  </library>
</component>

as soon as I deploy the sources AndroidStudio recognizes them and is adding them to the xml. I'm also able to see Javadoc in Android Studio:

<component name="libraryTable">
  <library name="adapter-0.4.324">
    <CLASSES>
      <root url="jar://$USER_HOME$/.android/build-cache/77393c6313510bd47cb4d4c9344c0d5fea59b1a0/output/jars/classes.jar!/" />
      <root url="file://$USER_HOME$/.android/build-cache/77393c6313510bd47cb4d4c9344c0d5fea59b1a0/output/res" />
    </CLASSES>
    <JAVADOC />
    <SOURCES>
      <root url="jar://$USER_HOME$/.m2/repository/[package]/0.4.324/adapter-0.4.324-sources.jar!/" />
    </SOURCES>
  </library>
</component>

To clarify my question: I want to deploy Javadoc to nexus -> AndroidStudio should show the javadoc automatically.

Regardless I'm able to add the javadoc manually via library properties. But I don't want to add them after every release again. The xml is updated correctly after that:

<component name="libraryTable">
  <library name="adapter-0.4.324">
    <CLASSES>
      <root url="jar://$USER_HOME$/.android/build-cache/77393c6313510bd47cb4d4c9344c0d5fea59b1a0/output/jars/classes.jar!/" />
      <root url="file://$USER_HOME$/.android/build-cache/77393c6313510bd47cb4d4c9344c0d5fea59b1a0/output/res" />
    </CLASSES>
    <JAVADOC>
      <root url="jar://$USER_HOME$/.m2/repository/[package]/0.4.324/adapter-0.4.324-javadoc.jar!/" />
    </JAVADOC>
    <SOURCES />
  </library>
</component>
andzie
  • 53
  • 7

1 Answers1

0

Seems to be a bug. Found the following bug reports: https://issuetracker.google.com/issues/37125917 https://issuetracker.google.com/issues/64061645

andzie
  • 53
  • 7