Lidjan
Lidjan

Reputation: 154

LibGDX - libraries on multiple machines

I have problem with new gdx-setup.jar. Now when You are trying to generate new project after choosing everything the gdx will generate whole project from You, it will even configure Build Path - there is where my problems starts. So gdx is creating a path to its libraries something like 'C:/users/user/28193721946210/.gradle/ ...' and so on.

Now - I want to work on this project on another machine - I am sharing project between computers with bitbucket. I was trying to unpin these dependencies from build path and just import my own libraries instead but I can't do much in here. Gradle have only power here, but in fact - there isn't any path in gradle.build or something - I can't make him to use my won dependencies instead of the generated ones.

Upvotes: 0

Views: 57

Answers (1)

noone
noone

Reputation: 19776

it will even configure Build Path ... creating a path to its libraries something like 'C:/users/user/28193721946210/.gradle/

This is correct, as Eclipse or any other IDE needs to know where the files are that it needs, on the actual, local machine.

However, these kind of platform specific settings are not static. They also should not be checked into any shared source versioning system.

If you are using git, the gdx-setup will conveniently generate a handy .gitignore file that will set all eclipse specific config files on ignore, for example .project or .classpath files.

LibGDX projects these days are built via gradle. That's why your IDE needs a gradle plugin to be able to read gradle configuration files, most importantly build.gradle, which defines the dependencies for your projects.

When importing those projects into your IDE, the IDE will parse the config files, understand which dependencies it needs, download them to your local machine and then setup a local build-path to those dependencies. However this IDE configuration can change when you trigger an update. In eclipse you do this for example via a rightclick on the project --> Gradle --> Refresh Dependencies.

Furthermore, it will setup the correct local paths on any machine you want to develop your game on.

Upvotes: 1

Related Questions