Skip to content

Commit

Permalink
integrated gdx-ai into build, made it GWT compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Jun 9, 2014
1 parent 9c5b3ac commit 1ca13fb
Show file tree
Hide file tree
Showing 10 changed files with 195 additions and 98 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[1.1.1]
- API change: Animation#frameDuration and #animationDuration are now hidden behind a getter/setter and dynamic
- API Addition: Vector#setZero
- API Addition: gdx-ai, extension for AI algorithms. Currently supports FSMs, see https://github.com/libgdx/libgdx/pull/1929

[1.1.0]
- Updated to RoboVM 0.0.13 and RoboVM Gradle plugin 0.0.9
Expand Down
14 changes: 13 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,18 @@
<reference refid="src"/>
</ant>
</target>

<!-- gdx ai -->
<target name="gdx-ai" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-ai">
<property name="distDir" value="${distDir}/extensions/gdx-ai"/>
<property name="jar" value="gdx-ai"/>
<reference refid="classpath"/>
</ant>
</target>

<!-- generates the javadoc for the core api and the application implementations -->
<target name="docs" depends="clean">
Expand Down Expand Up @@ -304,7 +316,7 @@
</target>

<target name="jars"
depends="clean,gdx-setup,gdx-core,gdx-backend-lwjgl,gdx-backend-jglfw,gdx-backend-headless,gdx-backend-android,gdx-backend-gwt,gdx-backend-robovm,gdx-tools,gdx-box2d,gdx-box2d-gwt,gdx-controllers,gdx-controllers-desktop,gdx-controllers-android,gdx-controllers-gwt,gdx-freetype,gdx-bullet"/>
depends="clean,gdx-setup,gdx-core,gdx-backend-lwjgl,gdx-backend-jglfw,gdx-backend-headless,gdx-backend-android,gdx-backend-gwt,gdx-backend-robovm,gdx-tools,gdx-box2d,gdx-box2d-gwt,gdx-controllers,gdx-controllers-desktop,gdx-controllers-android,gdx-controllers-gwt,gdx-freetype,gdx-bullet,gdx-ai"/>

<target name="all" depends="jars,docs">
<!-- copy distribution files (licences etc.) -->
Expand Down
58 changes: 58 additions & 0 deletions extensions/gdx-ai/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-parent</artifactId>
<version>1.1.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>gdx-ai</artifactId>
<packaging>jar</packaging>
<name>libGDX AI</name>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gdx</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>generate-resources</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src</directory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</build>
</project>
5 changes: 5 additions & 0 deletions extensions/gdx-ai/src/com/badlogic/gdx/ai.gwt.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module>
<source path="ai"/>
</module>
97 changes: 55 additions & 42 deletions extensions/gdx-box2d/gdx-box2d/pom.xml
Original file line number Diff line number Diff line change
@@ -1,47 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-box2d-parent</artifactId>
<version>1.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-box2d-parent</artifactId>
<version>1.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>gdx-box2d</artifactId>
<packaging>jar</packaging>
<name>libGDX Box2D</name>
<artifactId>gdx-box2d</artifactId>
<packaging>jar</packaging>
<name>libGDX Box2D</name>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gdx</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gdx-jnigen</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gdx</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gdx-jnigen</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
</dependencies>

<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>generate-resources</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>generate-resources</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

<resources>
<resource>
<directory>src</directory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</build>
</project>
108 changes: 54 additions & 54 deletions extensions/gdx-freetype/pom.xml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-parent</artifactId>
<version>1.1.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-parent</artifactId>
<version>1.1.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>gdx-freetype</artifactId>
<packaging>jar</packaging>
<name>libGDX FreeType</name>
<artifactId>gdx-freetype</artifactId>
<packaging>jar</packaging>
<name>libGDX FreeType</name>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gdx-jnigen</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gdx</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gdx</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gdx-jnigen</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
</dependencies>

<build>
<sourceDirectory>src</sourceDirectory>
<build>
<sourceDirectory>src</sourceDirectory>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>generate-resources</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>generate-resources</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

<resources>
<resource>
<directory>src</directory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</build>
<resources>
<resource>
<directory>src</directory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</build>
</project>
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<module>extensions/gdx-controllers</module>
<module>extensions/gdx-freetype</module>
<module>extensions/gdx-freetype/jni/maven</module>
<module>extensions/gdx-ai</module>
</modules>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='com.badlogic.gdx.GdxTests' />
<inherits name="com.badlogic.gdx.physics.box2d.box2d-gwt"/>
<inherits name="com.badlogic.gdx.ai"/>
<inherits name="com.badlogic.gdx.controllers.controllers-gwt"/>
<set-configuration-property name="gdx.assetpath" value="../gdx-tests-android/assets"/>
<entry-point class='com.badlogic.gdx.tests.gwt.client.GwtTestStarter' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.badlogic.gdx.tests.MusicTest;
import com.badlogic.gdx.tests.PixmapTest;
import com.badlogic.gdx.tests.ShortSoundTest;
import com.badlogic.gdx.tests.StateMachineTest;
import com.badlogic.gdx.tests.TimerTest;
import com.badlogic.gdx.tests.g2d.ProgressiveJPEGTest;
import com.badlogic.gdx.tests.utils.GdxTest;
Expand All @@ -39,7 +40,7 @@ public static void main (String[] argv) {
// new SharedLibraryLoader("../../extensions/gdx-controllers/gdx-controllers-desktop/libs/gdx-controllers-desktop-natives.jar").load("gdx-controllers-desktop");
// new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx");

GdxTest test = new TimerTest();
GdxTest test = new StateMachineTest();
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.r = config.g = config.b = config.a = 8;
// config.width = 320;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
import com.badlogic.gdx.tests.SpriteCacheOffsetTest;
import com.badlogic.gdx.tests.SpriteCacheTest;
import com.badlogic.gdx.tests.StageTest;
import com.badlogic.gdx.tests.StateMachineTest;
import com.badlogic.gdx.tests.TableTest;
import com.badlogic.gdx.tests.TextButtonTest;
import com.badlogic.gdx.tests.TextureAtlasTest;
Expand Down Expand Up @@ -683,5 +684,9 @@ public GdxTest instance () {
public GdxTest instance () {
return new TimeUtilsTest();
}
}, new Instancer() {
public GdxTest instance () {
return new StateMachineTest();
}
}};
}

0 comments on commit 1ca13fb

Please sign in to comment.