sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Javadoc and Sources seem missing for the sdk's libraries

Open MeFisto94 opened this issue 5 years ago • 5 comments
trafficstars

I.e. when a user is doing a project, they only have the method signatures, but that's not feasible.

MeFisto94 avatar Sep 08 '20 17:09 MeFisto94

So I've did some more investigation, I actually spent a whole workday on this, but couldn't get any progress. The problem comes from the subprojects not doing/having sources/javadoc artifacts, at least for javadoc, the specific property could be of use.

In order to reproduce, one needs to change the deps to like

def engineVersion = gradle.includedBuilds.find({i -> i.name == "jmonkeyengine"})
            .findResult({i -> i.availableModules.find({m -> m.right.projectName == "jme3-core"}).left.version})
corelibs dep("org.jmonkeyengine:jme3-core:$engineVersion", true, true)

or even more simple

corelibs dep("org.jmonkeyengine:jme3-core:null", true, true)

This will yield

> Could not resolve all files for configuration ':corelibs'.
   > Could not find jme3-core-javadoc.jar (project :jmonkeyengine:jme3-core).
   > Could not find jme3-core-sources.jar (project :jmonkeyengine:jme3-core).

Do note that this works for maven dependencies (engine or not), just not for the subproject. It's also strange, because the artifact file does not include the version, in this case. What I've seen from logs is, that when omitting the null or $engineVersion, javadoc is interpreted as version and uses the subproject one no matter what.

Does anyone have an idea, maybe @pspeed42 ?

MeFisto94 avatar Sep 10 '20 15:09 MeFisto94

Note: This also affects the ability to create an example/tests project, which is however something the engine should support without the SDK anyway

MeFisto94 avatar Mar 08 '21 16:03 MeFisto94

Ideally, the SDK would rely on official engine releases and not try to build its own engine JARs. That wasn't possible for v3.3, but it should be for v3.4.

The engine's v3.3.2-stable release lacked javadoc JARs and sources JARs for 2 of its 22 libraries: jme3-examples and jme3-testdata. Those omissions will be corrected in v3.4 of the engine. See https://github.com/jMonkeyEngine/jmonkeyengine/issues/1366.

In addition, a few of the engine's v3.3.2-stable libraries included javadoc JARs and sources JARs but were not (at the time) linked to JCenter. Due to an oversight(?) official JARs for jme3-ios and jme3-vr could only be obtained from BinTray. Those omissions were corrected while resolving https://github.com/jMonkeyEngine/jmonkeyengine/issues/1468. (I believe jme3-jbullet may also have been unlinked at one time.)

Sources JARs and javadoc JARs for all 17 libraries in engine v3.4 will be available from MavenCentral. I doubt Gradle will automatically download them with the class JARs and POMs, but they can surely be downloaded using custom Gradle tasks.

stephengold avatar Apr 05 '21 17:04 stephengold

I'm sure this has been discussed before, but why does the SDK have to build the engine by itself? It seems like it would reduce complexity severely if it could use regular releases. If it can be done and is desirable, which steps need to be taken?

neph1 avatar Mar 28 '22 06:03 neph1

Now that all of the Engine's Maven artifacts are online at Maven Central Repository, I believe you just need to alter the buildscripts to download them instead of building them from source.

stephengold avatar Mar 28 '22 15:03 stephengold

I'm sure this has been discussed before, but why does the SDK have to build the engine by itself? It seems like it would reduce complexity severely if it could use regular releases. If it can be done and is desirable, which steps need to be taken?

The SDK actually doesn't build the engine by itself anymore. Gradle downloads the JARs from Maven Central. The sources and javadocs are available from there already and @MeFisto94 has made the build.gradle so that it can also download the these and actually creates the XML configuration for the ANT projects that reference these. That being said... something is still wrong with this and the newly created Ant projects wont actually show the sources/javadoc. For unknown reasons....

Note that currently the build.gradle doesn't fetch the sources/javadocs (one can simply fiddle with corelibs dep("org.jmonkeyengine:jme3-core:null", true, true) these lines). And downloading the sources actually messes up the jME Test project template, a bug in the build.gradle. The latter issue is quite easy to fix but since the situation is not improved anyway I didn't commit a fix to this.

tonihele avatar Aug 22 '22 18:08 tonihele