Search code examples
gitlibgdxupdating

libGDX project update with use of git


I am working on a libGDX projects month ago, so there are several new versions of the framework. I have read, it is useful to update framework's files, but I have many classes, many assets. How can I update only the framework to the latest version?


Solution

  • On the official wiki, this is the recommended way.

    However, I have found a new way to do the same thing. It may be a good way if you do not wish to open up your gradle file.

    1. open your libgdx setup gdx-setup.jar file (mine is the latest at this time 1.5.5).

    2. Setup your parameters the way you setup for your other old project.

    3. Make sure that you have set the destination to a different location than your old project (DON'T overwrite your old project because you will need it, and is a good backup)

    4. Open the project up in whatever editor you use.

    This is the important Section. You said that you wanted to keep your old classes and assets

    1. Copy your assets and classes from your previous project to the new project.You can even copy your old code from your old project*;

    NOTE: Libgdx update 1.5.5 updates the following parameters. If you have anything that applies to the following you need to rewrite

    [1.5.5] -> Added iOS ARM-64 bit support for Bullet physics -> 3D Animation, NodeAnimation keyframes are separated into translation, rotation and scaling -> Added capability to enable color markup from inside skin json file. -> Exposed method ControllerManager#clearListeners on Controllers class -> Net#openURI now returns a boolean to indicate whether the uri was actually opened. -> DefaultShader now always combines material and environment attributes -> Added ShapeRenderer constructor to pass a custom shader program to ImmediateModeRenderer20. -> API Change: Group#toString now returns actor hierarchy. Group#print is gone. -> Added SpotLight class, see https://github.com/libgdx/libgdx/pull/2907 -> Added support for resolving file handles using classpaths (ClasspathFileHandleResolver)

    Hope this helped you.