{"id":13810714,"url":"https://github.com/bazelbuild/rules_gwt","last_synced_at":"2025-05-14T15:31:00.314Z","repository":{"id":44885641,"uuid":"64471691","full_name":"bazelbuild/rules_gwt","owner":"bazelbuild","description":"Bazel rules for GWT","archived":true,"fork":false,"pushed_at":"2024-03-20T13:58:45.000Z","size":67,"stargazers_count":19,"open_issues_count":13,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-19T05:55:25.142Z","etag":null,"topics":["bazel","bazel-rules","gwt"],"latest_commit_sha":null,"homepage":null,"language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bazelbuild.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-29T10:14:01.000Z","updated_at":"2024-06-14T22:54:08.000Z","dependencies_parsed_at":"2024-11-19T05:49:58.483Z","dependency_job_id":null,"html_url":"https://github.com/bazelbuild/rules_gwt","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelbuild%2Frules_gwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelbuild%2Frules_gwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelbuild%2Frules_gwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelbuild%2Frules_gwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bazelbuild","download_url":"https://codeload.github.com/bazelbuild/rules_gwt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254171666,"owners_count":22026485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bazel","bazel-rules","gwt"],"created_at":"2024-08-04T03:00:24.014Z","updated_at":"2025-05-14T15:30:57.357Z","avatar_url":"https://github.com/bazelbuild.png","language":"Starlark","readme":"[![Build status](https://badge.buildkite.com/098023d2f6cea6cc1d8645e99d8924901284b5551b6eb55bd2.svg)](https://buildkite.com/bazel/rules-gwt-postsubmit)\n\n# 📣 [Unmaintained] GWT Rules for Bazel\n\n\u003e [!WARNING]\n\u003e Due to an absence of any maintainers, this repository is archived and currently unmaintained.\n\u003e\n\u003e **We discourage any new dependencies on the contents of this repository.**\n\u003e\n\u003e If you, or your organization, are interested in revitalizing this project by taking over its maintenance, we welcome your initiative.\n\u003e To discuss the process of un-archiving and assuming ownership of this repository, please reach out to us via email at `bazel-contrib@googlegroups.com` or join the conversation on our Slack workspace in the `#rules` channel.\n\u003e You can sign up for Slack access at [https://slack.bazel.build](https://slack.bazel.build).\n\n\u003cdiv class=\"toc\"\u003e\n  \u003ch2\u003eRules\u003c/h2\u003e\n  \u003cul\u003e\n    \u003cli\u003e\u003ca href=\"#gwt_application\"\u003egwt_application\u003c/a\u003e\u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/div\u003e\n\n## Overview\n\nThese build rules are used for building [GWT](http://www.gwtproject.org/)\napplications with Bazel. Applications are compiled as `.war` files containing\ncompiled JavaScript and other resources. GWT applications can also be run in\n[Development Mode](http://www.gwtproject.org/doc/latest/DevGuideCompilingAndDebugging.html)\nvia `bazel run`.\n\n\u003ca name=\"setup\"\u003e\u003c/a\u003e\n## Setup\n\nTo be able to use the GWT rules, you must provide bindings for the GWT jars and\neverything it depends on. The easiest way to do so is to add the following to\nyour `WORKSPACE` file, which will give you default versions for GWT and each\ndependency:\n\n```python\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\nhttp_archive(\n  name = \"io_bazel_rules_gwt\",\n  url = \"https://github.com/bazelbuild/rules_gwt/archive/0.1.3.tar.gz\",\n  sha256 = \"3f017bd2f7734e259535da0bcc75398b883dda6da6b657dfa84bd02fab0a6916\",\n  strip_prefix = \"rules_gwt-0.1.3\",\n)\nload(\"@io_bazel_rules_gwt//gwt:gwt.bzl\", \"gwt_repositories\")\ngwt_repositories()\n```\n\nIf you want to use a different version of GWT or any of its dependencies, you\nmust provide your own bindings. Remove the `gwt_repositories()` line above and\nadd a `bind` rule for each of the following in your `WORKSPACE`:\n\n  * `//external:gwt-dev` (defaults to [`com.google.gwt:gwt-dev:2.8.0`](https://mvnrepository.com/artifact/com.google.gwt/gwt-dev/2.8.0))\n  * `//external:gwt-user` (defaults to [`com.google.gwt:gwt-user:2.8.0`](https://mvnrepository.com/artifact/com.google.gwt/gwt-user/2.8.0))\n  * `//external:gwt_ant` (defaults to [`org.apache.ant:ant:1.9.7`](https://mvnrepository.com/artifact/org.apache.ant/ant/1.9.7))\n  * `//external:gwt_asm` (defaults to [`org.ow2.asm:asm:5.0.3`](https://mvnrepository.com/artifact/org.ow2.asm/asm/5.0.3))\n  * `//external:gwt_colt` (defaults to [`colt:colt:1.2.0`](https://mvnrepository.com/artifact/colt/colt/1.2.0))\n  * `//external:gwt_commons-io` (defaults to [`commons-io:commons-io:2.4`](https://mvnrepository.com/artifact/commons-io/commons-io/2.4))\n  * `//external:gwt_gson` (defaults to [`com.google.code.gson:gson:2.6.2`](https://mvnrepository.com/artifact/com.google.code.gson/gson/2.6.2))\n  * `//external:gwt_javax-servlet` (defaults to [`javax.servlet:javax.servlet-api:3.1.0`](https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api/3.1.0))\n  * `//external:gwt_javax-validation` (defaults to [`javax.validation:validation-api:1.0.0.GA`](https://mvnrepository.com/artifact/javax.validation/validation-api/1.0.0.GA))\n  * `//external:gwt_java-validation-src` (defaults to [`javax.validation:validation-api:sources:1.0.0.GA`](https://mvnrepository.com/artifact/javax.validation/validation-api/1.0.0.GA))\n  * `//external:gwt_jetty-annotations` (defaults to [`org.eclipse.jetty:jetty-annotations:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-annotations/9.2.14.v20151106))\n  * `//external:gwt_jetty-http` (defaults to [`org.eclipse.jetty:jetty-http:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-http/9.2.14.v20151106))\n  * `//external:gwt_jetty-io` (defaults to [`org.eclipse.jetty:jetty-io:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-io/9.2.14.v20151106))\n  * `//external:gwt_jetty-jndi` (defaults to [`org.eclipse.jetty:jetty-jndi:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-jndi/9.2.14.v20151106))\n  * `//external:gwt_jetty-plus` (defaults to [`org.eclipse.jetty:jetty-plus:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-plus/9.2.14.v20151106))\n  * `//external:gwt_jetty-security` (defaults to [`org.eclipse.jetty:jetty-security:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-security/9.2.14.v20151106))\n  * `//external:gwt_jetty-server` (defaults to [`org.eclipse.jetty:jetty-server:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-server/9.2.14.v20151106))\n  * `//external:gwt_jetty-servlet` (defaults to [`org.eclipse.jetty:jetty-servlet:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlet/9.2.14.v20151106))\n  * `//external:gwt_jetty-servlets` (defaults to [`org.eclipse.jetty:jetty-servlets:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlets/9.2.14.v20151106))\n  * `//external:gwt_jetty-util` (defaults to [`org.eclipse.jetty:jetty-util:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-util/9.2.14.v20151106))\n  * `//external:gwt_jetty-webapp` (defaults to [`org.eclipse.jetty:jetty-io:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-webapp/9.2.14.v20151106))\n  * `//external:gwt_jetty-xml` (defaults to [`org.eclipse.jetty:jetty-io:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-xml/9.2.14.v20151106))\n  * `//external:gwt_jsinterop` (defaults to [`com.google.jsinterop:jsinterop-annotations:1.0.0`](https://mvnrepository.com/artifact/com.google.jsinterop/jsinterop-annotations/1.0.0))\n  * `//external:gwt_jsinterop-src` (defaults to [`com.google.jsinterop:jsinterop-annotations:sources:1.0.0`](https://mvnrepository.com/artifact/com.google.jsinterop/jsinterop-annotations/1.0.0))\n  * `//external:gwt_jsr-250-api` (defaults to [`javax.annotation:jsr250-api:1.0`](https://mvnrepository.com/artifact/javax.annotation/jsr250-api/1.0))\n  * `//external:gwt_sac` (defaults to [`org.w3c.css:sac:1.3`](https://mvnrepository.com/artifact/org.w3c.css/sac/1.3))\n  * `//external:gwt_tapestry` (defaults to [`tapestry:tapestry:4.0.2`](https://mvnrepository.com/artifact/tapestry/tapestry/4.0.2))\n\n\u003ca name=\"basic-example\"\u003e\u003c/a\u003e\n## Basic Example\n\nSuppose you have the following directory structure for a simple GWT application:\n\n```\n[workspace]/\n    WORKSPACE\n    src/main/java/\n        app/\n            BUILD\n            MyApp.java\n            MyApp.gwt.xml\n        lib/\n            BUILD\n            MyLib.java\n        public/\n            index.html\n```\n\nHere, `MyApp.java` defines the entry point to a GWT application specified by\n`MyApp.gwt.xml` which depends on another Java library `MyLib.java`. `index.html`\ndefines the HTML page that links in the GWT application. To build this app, your\n`src/main/java/app/BUILD` can look like this:\n\n```python\nload(\"@io_bazel_rules_gwt//gwt:gwt.bzl\", \"gwt_application\")\n\ngwt_application(\n  name = \"MyApp\",\n  srcs = glob([\"*.java\"]),\n  resources = glob([\"*.gwt.xml\"]),\n  modules = [\"app.MyApp\"],\n  pubs = glob([\"public/*\"]),\n  deps = [\n    \"//src/main/java/lib\",\n  ],\n)\n```\n\nNow, you can build the GWT application by running\n`bazel build src/main/java/app:MyApp`. This will run the GWT compiler and place\nall of its output as well as `index.html` into\n`bazel-bin/src/main/java/app/MyApp.war`. You can also run\n`bazel run src/main/java/app:MyApp-dev` to run GWT development mode for the\napplication. Once development mode has started, you can see the app by opening\nhttp://127.0.0.1:8888/index.html in a browser. Note that development mode assumes\nthat all of your `.java` files are located under `java/` or `src/main/java/` - see\ndetails on the `java_roots` flag below if this is not the case.\n\nFor a complete example, see the\n[`example/`](https://github.com/bazelbuild/rules_gwt/tree/master/example/src/main/java/io/bazel/sample)\ndirectory in this repository.\n\n\u003ca name=\"gwt_application\"\u003e\u003c/a\u003e\n## gwt_application\n\n```python\ngwt_application(name, srcs, resources, modules, pubs, deps, output_root, java_roots, compiler_flags, compiler_jvm_flags, dev_flags, dev_jvm_flags):\n```\n\n### Implicit output targets\n\n * `\u003cname\u003e.war`: archive containing GWT compiler output and any files passed\n   in via pubs.\n * `\u003cname\u003e-dev`: script that can be run via `bazel run` to launch the app in\n   development mode.\n\n\u003ctable class=\"table table-condensed table-bordered table-params\"\u003e\n  \u003ccolgroup\u003e\n    \u003ccol class=\"col-param\" /\u003e\n    \u003ccol class=\"param-description\" /\u003e\n  \u003c/colgroup\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth colspan=\"2\"\u003eAttributes\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eName, required\u003c/code\u003e\n        \u003cp\u003eA unique name for this rule.\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003esrcs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of .java source files that will be compiled and passed on the\n          classpath to the GWT compiler.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eresources\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of resource files that will be passed on the classpath to the GWT\n          compiler, e.g. \u003ccode\u003e.gwt.xml\u003c/code\u003e, \u003ccode\u003e.ui.xml\u003c/code\u003e, and\n          \u003ccode\u003e.css\u003c/code\u003e files.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003emodules\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of strings, required\u003c/code\u003e\n        \u003cp\u003e\n          List of fully-qualified names of modules that will be passed to the GWT\n          compiler. Usually contains a single module name corresponding to the\n          application's \u003ccode\u003e.gwt.xml\u003c/code\u003e file.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003epubs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, optional\u003c/code\u003e\n        \u003cp\u003e\n          Files that will be copied directly to the output war, such as static\n          HTML or image resources. Not interpreted by the GWT compiler.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003edeps\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of other java_libraries on which the application depends. Both the\n          class jars and the source jars corresponding to each library as well as\n          their transitive dependencies will be passed to the GWT compiler's\n          classpath. These libraries may contain other \u003ccode\u003e.gwt.xml\u003c/code\u003e,\n          \u003ccode\u003e.ui.xml\u003c/code\u003e, etc. files as \u003ccode\u003eresources\u003c/code\u003e.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eoutput_root\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eString, optional\u003c/code\u003e\n        \u003cp\u003e\n          Directory in the output war in which all outputs will be placed. By\n          default outputs are placed at the root of the war file.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ejava_roots\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of strings, optional\u003c/code\u003e\n        \u003cp\u003e\n          Directories relative to the workspace root that form roots of the\n          Java package hierarchy (e.g. they contain \u003ccode\u003ecom\u003c/code\u003e directories).\n          By default this includes \u003ccode\u003ejava\u003c/code\u003e, \u003ccode\u003ejavatests\u003c/code\u003e,\n          \u003ccode\u003esrc/main/java\u003c/code\u003e and \u003ccode\u003esrc/test/java\u003c/code\u003e. If your Java\n          files aren't under these directories, you must set this property in order\n          for development mode to work correctly. Otherwise GWT won't be able to\n          see your source files, so you will not see any changes reflected when\n          refreshing dev mode.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ecompiler_flags\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of strings, optional\u003c/code\u003e\n        \u003cp\u003e\n          Additional flags that will be passed to the GWT compiler. See\n          \u003ca href='http://www.gwtproject.org/doc/latest/DevGuideCompilingAndDebugging.html#DevGuideCompilerOptions'\u003ehere\u003c/a\u003e\n          for a list of available flags.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ecompiler_jvm_flags\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of strings, optional\u003c/code\u003e\n        \u003cp\u003e\n          Additional JVM flags that will be passed to the GWT compiler, such as\n          \u003ccode\u003e-Xmx4G\u003c/code\u003e to increase the amount of available memory.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003edev_flags\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of strings, optional\u003c/code\u003e\n        \u003cp\u003e\n          Additional flags that will be passed to development mode. See\n          \u003ca href='http://www.gwtproject.org/doc/latest/DevGuideCompilingAndDebugging.html#What_options_can_be_passed_to_development_mode'\u003ehere\u003c/a\u003e\n          for a list of available flags.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003edev_jvm_flags\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of strings, optional\u003c/code\u003e\n        \u003cp\u003e\n          Additional JVM flags that will be passed to development mode, such as\n          \u003ccode\u003e-Xmx4G\u003c/code\u003e to increase the amount of available memory.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n","funding_links":[],"categories":["Additional language support"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazelbuild%2Frules_gwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbazelbuild%2Frules_gwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazelbuild%2Frules_gwt/lists"}