Libgdx Maven Support

Today i kinda finalized our Maven support. You can read all about it on this fine wiki page.

The Maven support includes:

  • An archetype that will setup the core, desktop, Android and HTML5 projects
  • Ways to package your application for the desktop, Android and HTML5
  • Ways to run your application from the command line for the desktop and Android
  • IDE integration with Eclipse and Intellij Idea. The latter is a bit untested, doing so as you read this.

This was quite a bit of an effort. We lifted a lot of work from Michael Bayne’s PlayN archetype, Team Gemserk (arielsan and ruben) helped with writting a libgdx mavenizer that takes a distribution zip and creates artifacts/poms from it. They also wrote the fine maven natives plugin and hacked m2e-android to support relative asset paths.

This is all experimental at the moment. We are waiting on the m2e-android project to merge in a pull request and publish their plugin to the Eclipse market. For now you’ll have to compile and install this plugin from Gemserk’s fork. The archetype also needs to be installed manually from source.

I hope we can publish the artifacts and the archetype to Sonatype as soon as Ruben is back from his vaccation. Then you can easily create your projects without having to manually compile anything.

The iOS backend is currently not support. I first want to fix up the gdx-setup-ui before diving into this.

And because i had so much pain while creating this with the help of all the other folks, here’s a rant for you. I’m used to Maven and use it quite heavily at work. It works brilliantly there, but there’s a difference between that environment and what we do with libgdx. At work, we run in desktop environments only. This works with any IDE easily. For libgdx, we have to deal with a ton of IDE specific issues due to the different plugins for Android/GWT, e.g. Eclipse not being able to cope with relative paths (what a bunch of bullshit). Most of the work on Maven was figuring out how to work around all those Maven/IDE specific limitations. I gave up on Netbeans, so if someone can figure out how to get the archetype working there, send me a pull request. Intellij Idea and Eclipse should work. The state of Maven, IDE plugins and Android/GWT is a horrible one, and i would not recommend anyone working on that who wants to keep his sanity. I’m not looking forward to make all this work with the upcoming Groovy based Android build system :/

GWT 2.5 required for libgdx HTML5

I updated our GWT backend in preparation of things to come. Libgdx apps that use that backend need to run on GWT 2.5, so make sure you update your Eclipse plugin and the GWT SDK accordingly.

The reason for this is the inclusion of typed arrays directly in the GWT SDK. Up until now we used a custom JSNI wrapper.


It’s this time of the year again when yours truly needs a break. It’s been an exhausting year, with all the changes going on. I’ll be back in about 2 weeks, when i’ll have my holidays for this year. My plan:

– Open up iOS by introducing the backend into the gdx-setup-ui
– Try to identify performance bottlenecks on iOS and fix them (JNI is likely slow)
– Finish mavenization, got GWT working now (mostly), need to integrate iOS
– Check the three.js FBX converter and write an importer for the format it spits out. Reduecs the amount of time i have to waste to get the C++ version going.

That’s it, behave while i’m not here!