You need to update your build.gradle file, located in your project root.
In the allprojects/ext part you can define a variable to store the version number of gdx ai at one place (I’m using 1.4.0).
allprojects {
...
ext {
gdxVersion = '1.4.1'
+ gdxAiVersion = '1.4.0'
}
...
}
Then you have to add a compile action to each of your projects. Here the example for the desktop project:
project(":desktop") {
apply plugin: "java"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
...
+ compile "com.badlogicgames.gdx:gdx-ai:$gdxAiVersion"
}
}
Do the same for the other projects ( “core”, “android”, “html”). Note the $gdxAiVersion part, which takes your predefined version number… If you want to update to a new version, you just need to change it at one place.
When you updated the build.gradle file you can rebuild your project from command line with gradle or use the eclipse gradle tools to rebuild/refresh, if you are using eclipse. After the refresh you should be able to use the gdx-ai stuff.
Not sure if you have to provide something special for html and android versions, but it should work at least for desktop, if you add the compile line into core and desktop project. Hope this helps.