Packaging a LibGDX project

Packaging your application is easy as one command line task invocation. Its recommended you use the gradle tasks to package your app, as they are already wired up to bundle everything you need for each platform. However if you feel comfortable setting this up in your IDE by yourself, feel free!

Packaging for desktop

./gradlew desktop:dist

Generates a fat jar in desktop/build/libs directory that you can run with

java -jar desktop.jar

Further Packaging desktop

You can wrap this jar into a .EXE bundle along with a small JRE so that your end users don't have to have java installed. PackR is a wonderful tool that allows you to do this.

Packaging for Android

./gradlew android:assembleDebug

Will generate a debug APK in android/build/outputs/apk that you can send to users manually if they have disabled APK source checking.

To generate a signed APK, you can follow the guide here: Android Signing This goes through how you can do this in Intellij and Android studio, but also on command line. See the "Configure Gradle to sign your APK" section for this.

Packaging for iOS (Using RoboVM)

Its recommended you use your IDE plugin to package for RoboVM.


  • Create DEV and PROD Signing Identities in you Apple Developer account
  • Create DEV and PROD Provisioning profiles in your Apple Developer account
  • Once done, open XCode and select Menu XCode->Preferences. In the account section select your account and click "Download Manual Profiles (Xcode 9+) or "Download All Profiles" (Xcode 8)
  • Restart Android Intellij/Android Studio


  • Your DEV Signing Identities and Provisioning profiles are required to deploy on your local devices.
  • Your PROD ones will be used to submit to the AppStore.

  • Create an IPA in Intellij/Android Studio 1) Select Build -> Create IPA 2) The "Create IPA" windows comes up Module: your IOS LibGDXProject Destination Dir: where your IPA will be stored Signing Identity: Your DEV or PROD Signing identity Provisioning profile: Your DEV or PROD Provisioning profile Architectures: leave "All"

  • Create an IPA in Eclipse documentation here

Alternatively run:

./gradlew ios:createIPA

This will require you to setup additional configuration in the build.gradle file for robovm. See documentation

This will create an IPA in the ios/build/robovm folder that you distribute to the Apple App Store. You can follow Apple's guide on app store distribution

Packaging for Multi-OS Engine

See the official documentation for building an IPA with Multi-OS Engine here

Packaging for HTML

Run the following Gradle task to package the HTML project:

./gradlew html:dist

This will create the resulting javascript and assets in the html/build/dist folder. You have to serve these files by a webserver, (e.g. Apache/nginx)