A future-proof port of the com.google.user.window.Window
GWT module,
with no dependency on gwt-user
(besides the Java Runtime Emulation),
to prepare for GWT 3 / J2Cl.
-
Add the dependency to your build.
For Maven:
<dependency> <groupId>org.gwtproject.user.window</groupId> <artifactId>gwt-timer</artifactId> <version>1.0.0-RC-1</version> </dependency>
For Gradle:
implementation("org.gwtproject.timer:gwt-timer:1.0.0-RC-1")
-
Update your GWT module to use
<inherits name="org.gwtproject.timer.Timer" />
-
Change your
import
s in your Java source files:import org.gwtproject.timer.client.Timer;
To build gwt-timer:
- run
mvn clean install
on the parent directory.
To run the j2cl tests:
- switch to the 'gwt-timer-j2cl-tests' directory
- run
mvn j2cl:clean
&mvn j2cl:test
GWT Timer requires GWT 2.9.0 or newer!