-
Notifications
You must be signed in to change notification settings - Fork 246
Setting up your Development Environment
The gdxAI framework is available in Maven. The easiest way of going about this is to add the framework as a dependency of an existing Maven or Gradle project. There are two kinds of gdxAI releases.
- Official: well tested, stable packages that get released periodically. Its URL is: https://oss.sonatype.org/content/repositories/releases
- Snapshots: the result of nightly builds, they are more likely to break in unexpected ways. Its URL is: https://oss.sonatype.org/content/repositories/snapshots
First, you need to add the desired repository to your pom.xml
file. Change the URL depending on whether you want releases or snapshots.
<repositories>
<repository>
<id>sonatype</id>
<name>Sonatype</name>
<url>https://oss.sonatype.org/content/repositories/releases</url>
</repository>
</repositories>
Then you need to add the gdxAI dependency.
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-ai</artifactId>
<version>1.8.1</version>
</dependency>
Add the Maven repositories to your build.gradle
file.
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
Add the dependency to the dependencies
element.
dependencies {
classpath "com.badlogicgames.gdx:gdx-ai:1.8.1"
}
If you want the most bleeding edge version of gdxAI or prefer to make your own modifications, working from sources might be the best option. Follow these steps.
- Install Gradle
- Clone the Git repository
git clone https://github.com/libgdx/gdx-ai.git
- Import the
gdx-ai
andtests
projects into the IDE of your choice. Using the command line is also an option. - Now you can either:
- Run the
uploadArchives
task and generate three jar files: bytecode, sources and javadocs. They will be in your local Maven repository. - Add the
gdx-ai
project as a dependency to yours.
If you already have a Libgdx project and want to use gdxAI you need to add the appropriate repository to the build.gradle
file as we saw in the previous section. Additionally, you will need to add the following dependencies to your projects.
project(":core") {
dependencies {
compile "com.badlogicgames.gdx:gdx-ai:1.8.1"
}
}
project(":android") {
dependencies {
compile "com.badlogicgames.gdx:gdx-ai:1.8.1"
}
}
project(":html") {
dependencies {
compile "com.badlogicgames.gdx:gdx-ai:1.8.1:sources"
}
}
Don't forget to update your GdxDefinition.gwt.xml and GdxDefinitionSuperdev.gwt.xml with the proper inheritance:
<inherits name='com.badlogic.gdx.ai' />