Documente Academic
Documente Profesional
Documente Cultură
com/libgdx/libgdx/wiki/Project-Setup-Gradle
Pages 201
Libgdx provides a simple wizard tool ( gdxsetup.jar ) allowing you to easily get you started. This
will create a gradle ready project that ready to be imported into your IDE (Android Studio,
Table of Cont ent s
Eclipse..).
Wiki St yle Guide
Developer's Guide
1. Download LibGDX Project setup tool "gdx-setup.jar"
Introduction
2. Open you command line tool, go to the download folder and run Goals & Features
javajar./gdxsetup.jar Community &
Support
This will open the following setup that will allow you to generate your project Contributing
Games Built With
libGDX
Setting up your
Development Environment
(Eclipse, Android Studio,
Intellij IDEA, NetBeans)
Creating, Running,
Debugging and Packaging
Your Project
Eclipse
Android Studio and
Intellij IDEA
NetBeans
Commandline
Updating Your libGDX
Version
Adding Extensions
and 3rd Party Libraries
Publishing Your Own
Extensions Via the
Setup Application
Improving Your
Gradle Workflow
Creating Asset Project
in Eclipse
Deploying your
application
Working From Source
Running Demos
Running Tests
Building libGDX From
Source
Building the Bullet
wrapper
The Application
Framework
The Life-Cycle
Modules Overview
Starter Classes &
1 de 5 25/1/2017 8:50 p. m.
Project Setup Gradle libgdx/libgdx Wiki https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle
2 de 5 25/1/2017 8:50 p. m.
Project Setup Gradle libgdx/libgdx Wiki https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle
workflow without Gradle, as well as options to use an alternative repository to Maven Central and NinePatches
Bitmap Fonts
to not force downloading dependencies. You do not need to change the advance settings if you
Distance
are a beginner. Field Fonts
Color
When ready, click "Generate".
Markup
Language
note: You may get a message indicating that you have a more recent version of android build
Using
tools or android API than the recomended. This is not a blocking message and you may continue. TextureAtlases
Pixmaps
Now you are ready to impor t the project into your IDE, run, debug and package it !
Packing Atlases
Offline
Eclipse
Packing Atlases at
Intellij IDEA and Android studio Runtime
NetBeans Texture
Compression
Commandline
2D ParticleEffects
Tile Maps
scene2d
scene2d.ui
Table
This section provides additional information regarding:
Skin
3D Graphics
How to create a project from the command line, without the wizard.
Quick Start
The structure of a libGDX project. Models
What is Gradle Material and
Environment
ModelBatch
Creat ing a libgdx project using t he command line ModelCache
ModelBuilder,
This section is to create your project from the command line. This is not required if you use the MeshBuilder and
wizard above. IF you run it from the command line, specify the following arguments. MeshPartBuilder
3D Animations
dir: the directory to write the project to, relative or absolute and Skinning
name: the name of the application, lower-case with minuses is usually a good idea, e.g. Importing
mygame Blender Models in
libGDX
package: the Java package under which your code will live, e.g. com.badlogic.mygame
3D Particle Effects
mainClass: the name of the main ApplicationListener of your app, e.g. MyGame Perspective
sdkLocation: the location of your android sdk, Intellij uses this if ANDROID_HOME is not set Camera ??
Picking ??
excludeM odules: the modules to exclude (Desktop; Android; iOS; HTML) separated by ';' and
Managing Your Assets
not case sensitive, e.g. Android;ios. Optional. Default it includes all the modules
Internationalization and
extensions: the extensions to include (same name as in GUI: Bullet; Freetype; Tools; Localization
Controllers; Box2d; Box2dlights; Ashley; Ai) separated by ';' and not case sensitive, e.g. Utilities
box2d;box2dlights;Ai. Optional Reading & Writing
JSON
Putting it all together, you can run the project generator on the command line as follows: Reading & Writing
XML
javajargdxsetup.jardirmygamenamemygamepackagecom.badlogic.mygamemainClass Collections
3 de 5 25/1/2017 8:50 p. m.
Project Setup Gradle libgdx/libgdx Wiki https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle
MyGamesdkLocationmySdkLocation[excludeModules<modules>][extensions<extensions>] Reflection
jnigen
Math Utilities
Project layout
Interpolation
This will create a directory called mygame with the following layout: Vectors, Matrices,
Quaternions
Circles, Planes, Rays,
settings.gradle<definitionofsubmodules.Bydefaultcore,desktop,android,ht etc.
build.gradle<mainGradlebuildfile,definesdependenciesandplugins
Path Interface &
gradlew<scriptthatwillrunGradleonUnixsystems
Splines
gradlew.bat<scriptthatwillrunGradleonWindows
Bounding Volumes ??
gradle<localgradlewrapper
local.properties<Intellijonlyfile,definesandroidsdklocation Intersection &
Overlap Testing ??
core/ Tools
build.gradle<Gradlebuildfileforcoreproject* Texture Packer
src/<Sourcefolderforallyourgame'scode Hiero
2D Particle Editor
desktop/ Extensions
build.gradle<Gradlebuildfilefordesktopproject* Artificial Intelligence
src/<Sourcefolderforyourdesktopproject,containsLwjgllauncher
gdx-freetype
gdx-pay: cross-
android/
platform In-App-
build.gradle<Gradlebuildfileforandroidproject*
Purchasing API
AndroidManifest.xml<Androidspecificconfig
assets/<containsforyourgraphics,audio,etc.Sharedwithotherproje Physics
res/<containsiconsforyourappandotherresources Box2D
src/<SourcefolderforyourAndroidproject,containsandroidlaunche Bullet Physics
Setup
html/ Using the
build.gradle<Gradlebuildfileforthehtmlproject* Wrapper
src/<Sourcefolderforyourhtmlproject,containslauncherandhtml Using
webapp/<Wartemplate,ongenerationthecontentsarecopiedtowar.Cont Models
Contact
Callbacks
ios/
Custom
build.gradle<Gradlebuildfilefortheiosproject*
Classes
src/<Sourcefolderforyouriosproject,containslauncher
Debugging
Using libGDX With Other
* These scripts contain tasks that package natives and distribute your applications on the JVM Languages
Using libGDX With
respective platforms, you can add/maintain these tasks yourself, but only do so if you are familiar
Clojure
with Gradle, and what these tasks are doing, otherwise you will break your project.
Using libGDX With
Kotlin
Here is a good tutorial on how to install libGDX using a tool provided by Bad Logic.
Using libGDX With
Python
What is Gradle? Using libGDX With
Scala
Gradle is a dependency management and build system.
Third Party Extensions
Overlap2D
A dependency management system is an easy way to pull in 3rd party libraries into your project,
VisUI
without having to store the libraries in your source tree. Instead, the dependency management
VisRuntime
system relies on a file in your source tree that specifies the names and versions of the libraries
libgdx-utils
you need to be included in your application. Adding, removing and changing the version of a 3rd libgdx-utils-box2d
party library is as easy as changing a few lines in that configuration file. The dependency gdx-facebook
management system will pull in the libraries you specified from a central repository (in our case gdx-dialogs
Maven Central) and store them in a directory outside of your project. gdx-kiwi
gdx-lml
A build system helps with building and packaging your application, without being tied to a
Third Party Services
specific IDE. This is especially useful if you use a build or continuous integration server, where AdMob in libGDX
IDEs aren't readily available. Instead, the build server can call the build system, providing it with a Airpush in libGDX
build configuration so it knows how to build your application for different platforms. Swarm in libGDX
NextPeer in libGDX
In case of Gradle, both dependency management and build system go hand in hand. Both are Google Play Game
configured in the same set of files. See the Dependency management with Gradle and Services in libGDX
4 de 5 25/1/2017 8:50 p. m.
Project Setup Gradle libgdx/libgdx Wiki https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle
Clone in Deskt op
2017 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub API Training Shop Blog About
5 de 5 25/1/2017 8:50 p. m.