Trixt0r / spriter

A Generic Java importer for Spriter animation files.

Home Page:https://brashmonkey.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LibGDX GWT support

denisk20 opened this issue · comments

I'm trying to compile my libgdx-spriter project for GWT, so I run ./gradlew html:dist from the root of my standard libGDX project and I get this:

   Validating units:
      [ERROR] Errors in 'file:/home/denisk20/myproject/core/src/com/brashmonkey/spriter/Spriter.java'
         [ERROR] Line 75: The method getDeclaredConstructor(Class<?>[]) is undefined for the type Class<capture#12-of ? extends Drawer>
         [ERROR] Line 96: No source code is available for type java.io.FileInputStream; did you forget to inherit a required module?
         [ERROR] Line 113: The method getDeclaredConstructor(Class<?>[]) is undefined for the type Class<capture#14-of ? extends Loader>
         [ERROR] Line 145: The method getDeclaredConstructor(Class<Entity>) is undefined for the type Class<capture#15-of ? extends Player>

Spriter class is GTW-unfriendly since it uses streams and reflection which can't be used in GWT.

Is there a way to fix this?

While I can't give you a solution, I can tell you that I've just started using this tool in a gwt-compiled game. I don't use libgdx (I use PlayN). I also had to remove some gwt-unsupported class references (java file usage, readers) but that doesn't seem to have anything to do with your problem.

I'm using the newest beta version of gwt.

The Spriter class is not intended to be used with GWT, since there is reflection stuff going on, so the gdx-spriter implementation could implement a more specific LibGDX Spriter manager class.

Hey :-) so its still not working on Gwt ?

I try do get it run (https://discord.com/channels/348229412858101762/873153589642657824) but without success.

thanks