google / jsinterop-annotations

JsInterop java annotations for J2CL and GWT
Apache License 2.0
16 stars 8 forks source link
gwt j2cl jsinterop

JsInterop Annotations · Build Status

JsInterop Annotations contains a set of java annotations that drive the javascript code generation of J2CL transpiler or GWT

Bazel dependency

If your project uses Bazel, add this repository as an external dependency in your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
_JSINTEROP_ANNOTATIONS_VERSION = "2.0.2"
http_archive(
    name = "com_google_jsinterop_annotations",
    strip_prefix = "jsinterop-annotations-%s" % _JSINTEROP_ANNOTATIONS_VERSION,
    url = "https://github.com/google/jsinterop-annotations/archive/%s.zip" % _JSINTEROP_ANNOTATIONS_VERSION,
)

Then add @com_google_jsinterop_annotations//:jsinterop-annotations-j2cl to your j2cl_library deps.

Maven dependency

If your project uses Maven, add the following maven dependency in your pom.xml:

<dependency>
    <groupId>com.google.jsinterop</groupId>
    <artifactId>jsinterop-annotations</artifactId>
    <version>2.0.2</version>
</dependency>

Download the jar file

You can also download manually the jar file.

Build GWT compatible maven jar files

If you want to build the last version on your own, follow the instructions below:

    $ npm install -g @bazel/bazelisk
    $ alias bazel=bazelisk

Contributing

Please refer to the contributing document.

Licensing

Please refer to the license file.

Disclaimer

This is not an official Google product.