Home Ask Login Register

Developers Planet

Your answer is one click away!

sneelhorses February 2016

How do I use LibGDX, Gradle, Git, and Eclipse together?

I have a LibGDX project for Android and Windows which I created with the LibGDX project setup app (https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle), and I have no problems running the project on my main development computer. I want to work on this project from multiple computers and with other developers using Git, and so I placed all three projects into a Git repository. When I try downloading and importing the projects from the repository, I get a bunch of Build Path errors in Eclipse, since my main computer is a Mac and the other computers are Windows and Gradle downloaded the libraries for the projects to my User library (which I've always understood to be normal behavior). How do I fix this issue? Should my Git repository contain all the libraries, and then must I fix the build path by hand? If this is the case, what was the purpose of using Gradle in the first place?


Arul February 2016

If you have gradle integration with eclipse setup in all the computers, it will work if you do the following,

  1. Do not commit any of eclipse metadata directories/files to the repo.

  2. In the new computer (any OS) import(either after cloning externally or materializing from git) the gradle project and allow the tool chain to download dependencies and setup the eclipse project.

Post Status

Asked in February 2016
Viewed 2,265 times
Voted 6
Answered 1 times


Leave an answer

Quote of the day: live life