Search code examples
android-studiolibgdx

libGDX desktop application JAR generation


I have a libGDX project(which is also desktop compatible) and would like to export its desktop application to a JAR file, to run it like a standalone application. How can I do this with use of Android Studio?


Solution

  • Your LibGDX projects are still gradle-based, whatever IDE you are using.

    Thus you can use Gradle on the Commandline to package your application.

    For desktop you do this via gradlew desktop:dist. After that the resulting runnable jar file will be in desktop/build/libs/.