From f22e7b446fbad44bfb8bfbb7351061a3127897fe Mon Sep 17 00:00:00 2001 From: Anton Chekulaev Date: Thu, 22 Dec 2022 23:26:23 +0100 Subject: [PATCH] GWT demo module partial revamp. --- CHANGES.md | 2 +- demo/gradle.properties | 2 +- demo/html/build.gradle | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9cac188..83f5c06 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,7 +4,7 @@ - `VfxEffect` constrains its internal width and height on `#resize(int, int)`. Max side size of the internal buffers is now limited to the `VfxEffect#MAX_FRAME_BUFFER_SIDE` constant value which is 8192 by default. -Feel free to change it according to you project requirements. +Feel free to change it according to your project requirements. ## [0.5.0] diff --git a/demo/gradle.properties b/demo/gradle.properties index 5d4086d..38476e2 100644 --- a/demo/gradle.properties +++ b/demo/gradle.properties @@ -1,6 +1,6 @@ androidPluginVersion=3.6.1 roboVmVersion=2.3.8 -gwtPluginVersion=1.0.13 +gwtPluginVersion=1.1.19 # Should match the GWT version used for building the official LibGDX GWT backend gwtLibVersion=2.8.2 lmlVersion=1.10.1.11.0 diff --git a/demo/html/build.gradle b/demo/html/build.gradle index 4cc943b..2d19879 100644 --- a/demo/html/build.gradle +++ b/demo/html/build.gradle @@ -47,8 +47,6 @@ dependencies { implementation "com.crashinvaders.lml:gdx-kiwi:$lmlVersion:sources" } -def HttpFileServer server = null -def httpFilePort = 8080 task startHttpServer() { dependsOn draftCompileGwt String output = project.buildDir.path + "/gwt/draftOut" @@ -61,8 +59,12 @@ task startHttpServer() { from "war" into output } - server = new SimpleHttpFileServerFactory().start(new File(output), httpFilePort) + + def server = new SimpleHttpFileServerFactory().start(new File(output), 8080) println "Server started in directory ${server.getContentRoot()}, http://localhost:${server.getPort()}/index.html" + // This helps to bind the http server lifetime to the lifetime of the task itself. + // https://stackoverflow.com/a/45060802/3802890 + while(true) Thread.sleep(1000) } }