rafaskb/typing-label

GWT Task :html:draftCompileGwt FAILED: color cannot be resolved or is not a field

aallnneess opened this issue · 3 comments

Hello,

if i tryed to compile a libgdx html superdev project with typing-label i get this error:

Compiling module com.tutorial.firstgame.GdxDefinitionSuperdev
   [ERROR] Errors in 'jar:file:/C:/Users/alnes/.gradle/caches/modules-2/files-2.1/com.rafaskoberg.gdx/typing-label/1.2.0/1f526e60b1ce6950b5d35086c6bed55f6cbda4d1/typing-label-1.2.0-sources.jar!/com/rafaskoberg/gdx/typinglabel/effects/FadeEffect.java'
      [ERROR] Line 54: color cannot be resolved or is not a field
   Tracing compile failure path for type 'com.rafaskoberg.gdx.typinglabel.effects.FadeEffect'
      [ERROR] Errors in 'jar:file:/C:/Users/alnes/.gradle/caches/modules-2/files-2.1/com.rafaskoberg.gdx/typing-label/1.2.0/1f526e60b1ce6950b5d35086c6bed55f6cbda4d1/typing-label-1.2.0-sources.jar!/com/rafaskoberg/gdx/typinglabel/effects/FadeEffect.java'
         [ERROR] Line 54: color cannot be resolved or is not a field
   [ERROR] Hint: Your source appears not to live underneath a subpackage called 'client'; no problem, but you'll need to use the <source> directive in your module to make it accessible

> Task :html:draftCompileGwt FAILED

gdxVersion=1.10.1-SNAPSHOT
freefontTypeGwtVersion=1.9.11-SNAPSHOT
regExodusVersion = 0.1.10
typingLabelVersion = 1.2.0

build.gradle core:

dependencies 
	api "games.rednblack.hyperlap2d:runtime-libgdx:$h2dVersion"
	api "com.badlogicgames.gdx:gdx:$gdxVersion"
	api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
	api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
	api "com.badlogicgames.ashley:ashley:$ashleyVersion"
	implementation 'com.github.raeleus:stripe:0.0.3'

build.gradle html

dependencies 
	implementation project(':core')
	implementation "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
	implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
	implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
	implementation "games.rednblack.hyperlap2d:runtime-libgdx:$h2dVersion:sources"
	implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion:sources"
	implementation "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion"
	implementation "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources"
	implementation "com.badlogicgames.ashley:ashley:$ashleyVersion:sources"
	implementation "com.github.intrigus.gdx-freetype-gwt:gdx-freetype-gwt:$freefontTypeGwtVersion"
	implementation "com.github.intrigus.gdx-freetype-gwt:gdx-freetype-gwt:$freefontTypeGwtVersion:sources"
	implementation "com.github.tommyettinger:regexodus:$regExodusVersion:sources"
	implementation "com.rafaskoberg.gdx:typing-label:$typingLabelVersion:sources"
	implementation 'com.github.raeleus:stripe:0.0.3:sources'

Gdx Xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.2//EN" "http://www.gwtproject.org/doctype/2.8.2/gwt-module.dtd">
<module rename-to="html">
	<source path="" />
	<inherits name="com.badlogic.gdx.backends.gdx_backends_gwt" />
	<inherits name="com.ray3k.stripe" />


	<extend-configuration-property name="gdx.reflect.include" value="com.badlogic.ashley" />
	<inherits name="HyperLap2D" />
	<inherits name="com.tutorial.firstgame.GameMain" />



	<entry-point class="com.tutorial.firstgame.gwt.GwtLauncher" />


	<set-configuration-property name="gdx.assetpath" value="../assets" />
	<set-configuration-property name="xsiframe.failIfScriptTag" value="FALSE"/>
	<!-- These two lines reduce the work GWT has to do during compilation and also shrink output size. -->
	<set-property name="user.agent" value="gecko1_8, safari"/>
	<collapse-property name="user.agent" values="*" />
	<!-- Remove the "user.agent" lines above if you encounter issues with Safari or other Gecko browsers. -->

**_AND VERY MUCH gdx.reflect.include / gdx.reflect.exclude_**

Is this just a typo ?

With gdx version 1.10.0 it was still working.

fgnm commented

Hey @rafaskb, more info about this issue: this is not just a GWT problem, but FadeEffect class is no more compatible with libGDX 1.10.1 due to a break change in GlyphLayout.GlyphRun. Indeed glyph.run.color doesn't exists anymore (libgdx/libgdx@370631c#diff-bde56e0947ac27bbd3bdfa3443e96fca88156f901b71b50a5bc49952b118fef4L532).

Thanks :)

Hey folks, thanks for pointing that out, indeed the changes made in libGDX 1.10.1 break some things in Typing Label. I'll take a look at it ASAP.

The original issue is also related to missing the GWT inherits line for typing-label; this should be added after any of the other inherits lines in the .gwt.xml file:

<inherits name="com.rafaskoberg.gdx.typinglabel.typinglabel" />

Then you would encounter the issues with GlyphRun changing in the latest libGDX.