Gradle Builds and Missing Nifty Dependencies

I’ve been taking the plunge and reorganizing Spoxel into a gradle build but I’ve hit some problems with Nifty. I know Nifty itself isn’t included as part of Jmonkey, however, Jmonkey requires 1.4.1 and only 1.4.2 exists in maven. I’m assuming looking at the time frame and github commits that Jmonkey 3.1.0-beta1 was released before 1.4.2 of nifty and I’m not sure if Nifty 1.4.1 was on Maven or not. Has anyone else run into this? Am I going to have to break down and just manually include the lib? I’m a pretty big noob when it comes to using gradle so i’m probably missing something obvious here.

You might just have picked the wrong repo.
They used to be on sourceforge, maybe you simply had a too-new source? You can take a look at where the SDK gets it’s nifty dependencies from, maybe that helps.

Take a look at this. We have 1.4.1 Nifty with 3.1 beta1 running, no problem. Next JME 3.1 release will have 1.4.2 of Nifty if I understood correctly. Waiting for the next release to get the hacks out finally (from our code, not Gradle).

Why not just:
jcenter()

…and what’s that about? The simsilica stuff can be used just like any other dependency without specifying a subdirectory.

Thanks :slight_smile: We’ll fix it

Well this is bizarre… last night when I was frustrated enough to post this I had this in my dependencies:

dependencies {
    compile "org.jmonkeyengine:jme3-core:$jmeVersion"
    compile "org.jmonkeyengine:jme3-desktop:$jmeVersion"
    compile "org.jmonkeyengine:jme3-lwjgl:$jmeVersion"
    compile "org.jmonkeyengine:jme3-networking:$jmeVersion"
    compile "org.jmonkeyengine:jme3-niftygui:$jmeVersion"
    compile "org.jmonkeyengine:jme3-plugins:$jmeVersion"
    compile 'com.google.guava:guava:19.0'
    compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.+'
    compile group: 'junit', name: 'junit', version: '4.+'
    compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.+'
    compile 'org.codehaus.groovy:groovy-all:2.4.7'
    compile 'com.simsilica:lemur:1.8.2'

    compile group: 'com.almworks.sqlite4java', name: 'sqlite4java', version: '1.0.392'
}

I was getting this error in netbeans:

- Compile time dependencies of SpoxelShared [main] could not be resolved. (Could not find com.github.nifty-gui:nifty:1.4.1. Searched in the following locations:     https://jcenter.bintray.com/com/github/nifty-gui/nifty/1.4.1/nifty-1.4.1.pom     https://jcenter.bintray.com/com/github/nifty-gui/nifty/1.4.1/nifty-1.4.1.jar     https://repo1.maven.org/maven2/com/github/nifty-gui/nifty/1.4.1/nifty-1.4.1.pom     https://repo1.maven.org/maven2/com/github/nifty-gui/nifty/1.4.1/nifty-1.4.1.jar     http://updates.jmonkeyengine.org/maven/com/github/nifty-gui/nifty/1.4.1/nifty-1.4.1.pom     http://updates.jmonkeyengine.org/maven/com/github/nifty-gui/nifty/1.4.1/nifty-1.4.1.jar     http://nifty-gui.sourceforge.net/nifty-maven-repo/com/github/nifty-gui/nifty/1.4.1/nifty-1.4.1.pom     http://nifty-gui.sourceforge.net/nifty-maven-repo/com/github/nifty-gui/nifty/1.4.1/nifty-1.4.1.jar Required by:     com.spoxel:SpoxelShared:1.0)
- Runtime dependencies of SpoxelShared [main] could not be resolved. (Could not find com.github.nifty-gui:nifty:1.4.1. Required by:     com.spoxel:SpoxelShared:1.0)
- Compile time dependencies of SpoxelShared [test] could not be resolved. (Could not find com.github.nifty-gui:nifty:1.4.1. Required by:     com.spoxel:SpoxelShared:1.0)
- Runtime dependencies of SpoxelShared [test] could not be resolved. (Could not find com.github.nifty-gui:nifty:1.4.1. Required by:     com.spoxel:SpoxelShared:1.0)

But of course I come in this morning and refresh the project and it all disappears. That’s a little frustrating but at least it works now. Thanks for the help!

Looks like you still have this in your repos list which I’m pretty sure doesn’t exist anymore. Maybe it took longer to time out or something… anyway, you should remove it, I guess.