GoogleGit

GWT Open Source Project
  1. 631b349  Fixes some issue related instanceof operations on JsTypes. by Goktug Gokdogan - 27 hours ago master
  2. a5abe02  Move checkBounds from StringHelper to InternalPreconditions. by Daniel Kurka - 10 days ago
  3. fa4e5c7  Removes JTypeOracle.isJsType and isJsFunction. by Goktug Gokdogan - 7 days ago
  4. 9f283b7  Fix corner case in server-side Stack trace debofuscation. by Roberto Lublinerman - 10 days ago
  5. 541858e  Improve Map feature check. by Goktug Gokdogan - 8 days ago

 GWT

GWT is the official open source project for GWT releases 2.5 and onwards.

In this document you have some quick instructions to build the SDK from source code and to run its tests.

For a more detailed documentation visit our web site. If you are interested in contributing with the project, please read the Making GWT better section.

Building the GWT SDK:

Note: that you need svn to checkout gwt-tools

$ ant clean elemental dist-dev

or if you don’t have python and g++ just run

$ ant clean dist-dev

Then you will get all .jar files in the folder build/lib and the redistributable file will be: build/dist/gwt-0.0.0.zip

if you want to specify a different version number run:

$ ant elemental clean dist-dev -Dgwt.version=x.x.x

$ ant clean elemental dist

How to verify GWT code conventions:

$ ant compile.tests apicheck checkstyle -Dprecompile.disable=true

How to run GWT tests

In a Unix like platform you can use the export command:

$ export TZ=America/Los_Angeles ANT_OPTS=-Dfile.encoding=UTF-8

But in Windows™ you have to set the time-zone in your control panel, and the environment variables using the command set.

$ ant test

GWT build scripts use specific ant tasks and a bunch of system properties listed in the following table to specify which tests to run and how.

For instance to run the task test in the module user you have to change to the user folder and run ant with the task as argument, adding any other property with the -D flag:

$ ( cd user && ant test -Dtest.emma.htmlunit.disable=true ; cd .. )

Module         | Task                   | Property to skip
-------------- | ---------------------- | ----------------
dev            | test                   | test.dev.disable
codeserver     | test                   | test.codeserver.disable
user           | test                   | test.user.disable
user           | test.nongwt            | test.nongwt.disable
user           | test.dev.htmlunit      | test.dev.htmlunit.disable
user           | test.web.htmlunit      | test.web.htmlunit.disable
user           | test.draft.htmlunit    | test.draft.htmlunit.disable
user           | test.nometa.htmlunit   | test.nometa.htmlunit.disable
user           | test.emma.htmlunit     | test.emma.htmlunit.disable
user           | test.coverage.htmlunit | test.coverage.htmlunit.disable
user           | test.dev.selenium      | test.dev.selenium.disable
user           | test.web.selenium      | test.web.selenium.disable
user           | test.draft.selenium    | test.draft.selenium.disable
user           | test.nometa.selenium   | test.nometa.selenium.disable
user           | test.emma.selenium     | test.emma.selenium.disable
requestfactory | test                   |
elemental      | test                   |
elemental      | test.nongwt            |
elemental      | test.dev.htmlunit      |
elemental      | test.web.htmlunit      |
tools          | test                   |

Additionally you can utilize some variables to filter which test to run in each task:

Module         | Task                                  | Properties                           | Default
---------------|---------------------------------------|--------------------------------------|-------------------
dev/core       | test                                  | gwt.junit.testcase.dev.core.includes | `**/com/google/**/*Test.class`
               |                                       | gwt.junit.testcase.dev.core.excludes |
user           | test                                  | gwt.junit.testcase.includes          | `**/*Suite.class`
user           | test.nongwt                           | gwt.nongwt.testcase.includes         | `**/*JreSuite.class`
               |                                       | gwt.nongwt.testcase.excludes         |
user           | test.web.* test.draft.* test.nometa.* | gwt.junit.testcase.web.includes      | `**/*Suite.class`
               |                                       | gwt.junit.testcase.web.excludes      | `**/*JsInteropSuite.class,**/*JreSuite.class,***/OptimizedOnly*`
user           | test.dev.* test.emma.*                | gwt.junit.testcase.dev.includes      | `**/*Suite.class`
               |                                       | gwt.junit.testcase.dev.excludes      | `**/*JsInteropSuite.class,**/*JreSuite.class,***/OptimizedOnly*`

Examples

$ ( cd dev && ant test ; cd .. )

_Note: that the last `cd ..' is only needed in Windows._

$ ant dev -Dtarget=test

$ ( cd dev/codeserver && ant test )

or

$ ant codeserver -Dtarget=test -Dtest.dev.disable=true

_Note: that we disable dev tests because code server depends on dev
and we don`t want to run its tests._

$ ( cd elemental && ant test.nongwt )

or

$ ant elemental -Dtarget=test -Dtest.dev.disable=true -Dtest.user.disable=true

_Note: that we have to disable dev and user tests because elemental
depends on both._

$ ant tools -Dtarget=test -Dtest.dev.disable=true -Dtest.user.disable=true

$ ant dev -Dtarget=test \ -Dgwt.junit.testcase.dev.core.includes="**/JsniRefTest.class"

$ ant dev -Dtarget=test \ -Dgwt.junit.testcase.dev.core.includes="**/JsniRefTest.class,**/JsParserTest.class"

Note: that you have to use regular expressions separated by comma to select the test classes to execute.

$ ( cd user && ant test.nongwt )

  or

$ ant user -Dtarget=test -Dtest.dev.disable=true \ -Dtest.dev.htmlunit.disable=true \ -Dtest.web.htmlunit.disable=true \ -Dtest.coverage.htmlunit.disable=true \ -Dtest.dev.selenium.disable=true \ -Dtest.draft.htmlunit.disable=true \ -Dtest.draft.selenium.disable=true \ -Dtest.emma.htmlunit.disable=true \ -Dtest.emma.selenium.disable=true \ -Dtest.nometa.htmlunit.disable=true \ -Dtest.nometa.selenium.disable=true \ -Dtest.web.selenium.disable=true

_Note: that we have to set all disable variables but `test.nongwt.disable`_

$ ( cd user && ant test.nongwt -Dgwt.nongwt.testcase.includes="**/I18NJreSuite.class" )

$ ( cd user && ant test.dev.htmlunit )

Branches

Tags

More...