[libgdx/gradle] Won't load gdx nightlies

I’m trying to convert my libgdx project to the new gradle build format. I’m more or less done, but I’m running into a strange problem. I used gradle for the first time today, so it might be that I overlooked something obvious.

What I want is that my project uses the libgdx nightlies. When I check out the project on my build server and build it with gradle this seems to be working fine. But on my development machine it looks like gradle is using the stable releases instead of the nightlies.

Why I think that? I got some compile errors when building with gradle on my machine. I knew the places in the code, because I had changed them, when I updated my project from the stable 0.9.9 release to the nightlies. All of my changes had to be reverted…

One error I get is related with the scene2d actor SelectBox. I was using the class with a generic paramter, but now suddenly the compiler tells me, that select box does not has any generic types. I checked in the gdx github and it seems that the changes that introduced the generic type were added this february. I also checked some other cases with the same result, that the gdx lib does not match the code on github.

Here is my build.gradle file: http://pastebin.com/Etcb9T2G

What I have tried so far:

  • Refresh references via eclipse
  • Refresh references via command line
  • Clear the gradle cache
  • Clone the repository once more on both systems (dev machine / build server) and testing the gradle build with that version.

Everything yielded the same results and what’s giving me most headaches is that the behavior is different on the server. I would appreciate the help, if somebody knows what I’m doing wrong.

I think I have found the problem. I have tried to setup libgdx with maven some time ago, but I didn’t manage to get it running, so (after I wasted some time) i decided to not use maven. From then I had an older snapshot release in my local maven repository. I wasn’t aware of that. After deleting the badlogicgames folder in my local repo, gradle loaded the most recent nightlies.

Now this leads me to another question. How do I tell gradle to force update the snapshot releases? I tried the refresh references buttons in eclipse and in the command line, but it seems that this didn’t really work. Any clues?