dategwt

GWT get build date


When I compile my webapplication in GWT I would like the compile to set a date/time or update a buildnumber in my application but I just can't figure out how. Is there a way to run code on compilation? Or is it possible to let my compiler fill this in at the right spot (through the project.xml)?


Solution

  • You could either modify your source code before calling the GWT compiler (relatively easy with Maven and resource filtering, or with Ant, and probably any kind of build script), or possibly write a GWT generator for that.

    See https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsDeferred#generators