-
Notifications
You must be signed in to change notification settings - Fork 113
Fluid Api GWT
Daan van Yperen edited this page Sep 16, 2016
·
2 revisions
GWT is supported.
Assuming a default LibGDX or artemis-odb-quickstart project:
-
Include the components module in your html/build.gradle
task addSource << { sourceSets.main.compileClasspath += files(project(':core').sourceSets.main.allJava.srcDirs) sourceSets.main.compileClasspath += files(project(':components').sourceSets.main.allJava.srcDirs) }
-
Create a gwt include file for your component module '/components/src/GdxArtemisComponents.gwt.xml'
<?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="com/mycompany/game/component" /> </module>
1. include the component module in your main `.gwt.xml` so gwt will be able to find all sources.
```xml
<inherits name='GdxArtemisComponents'/>
<inherits name='GdxArtemisGame'/>
```
1. Make sure the reflection generator for Artemis knows about the fluid classes in `.gwt.xml`, or it will complain about missing type information at launch.
```xml
<extend-configuration-property name="artemis.reflect.include" value="com.artemis.SuperMapper"/>
<extend-configuration-property name="artemis.reflect.include" value="com.artemis.E"/>
That's about it! gradle html:dist
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference