|
1 | | -# JsInterop Base · [](https://github.com/google/jsinterop-base/actions/workflows/ci.yaml) |
| 1 | +# JsInterop Base ·  · [](https://github.com/google/jsinterop-base/actions/workflows/ci.yaml) |
2 | 2 |
|
3 | 3 | jsInterop-base contains a set of utilities that cannot be expressed with |
4 | 4 | Jsinterop itself and allows GWT and J2CL projects to write certain JavaScript |
5 | 5 | expressions with pure Java. |
6 | 6 |
|
7 | 7 | Bazel dependency |
8 | 8 | ---------------- |
9 | | -If your project uses [Bazel](https://bazel.build), add this repository as an |
10 | | -external dependency in your `WORKSPACE` file: |
11 | 9 |
|
12 | | -``` |
13 | | -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
14 | | -_JSINTEROP_BASE_VERSION = "1.0.0" |
15 | | -http_archive( |
16 | | - name = "com_google_jsinterop_base", |
17 | | - strip_prefix = "jsinterop-base-%s" % _JSINTEROP_BASE_VERSION, |
18 | | - url = "https://github.com/google/jsinterop-base/archive/%s.zip" % _JSINTEROP_BASE_VERSION, |
19 | | -) |
| 10 | +Using Bazel 8 or later, add to your \`MODULE.bazel\` file: |
| 11 | + |
| 12 | +```starlark |
| 13 | +bazel_dep(name = "jsinterop_base", version = "<RELEASE_VERSION>") |
20 | 14 | ``` |
21 | 15 |
|
22 | | -Then add `@com_google_jsinterop_base//:jsinterop-base-j2cl` to |
23 | | -your `j2cl_library` deps. |
| 16 | +Replace `RELEASE_VERSION` with an actual |
| 17 | +[release version](https://github.com/google/jsinterop-base/releases): |
24 | 18 |
|
| 19 | +Then add `@jsinterop_base//:jsinterop-base-j2cl` to your `j2cl_library` deps. |
25 | 20 |
|
26 | 21 | Maven dependency |
27 | 22 | ------------------ |
28 | 23 | If your project uses [Maven](https://maven.apache.org), add the following maven |
29 | | -dependency in your `pom.xml`: |
| 24 | +dependency in your `pom.xml`. Replace `RELEASE_VERSION` with an actual |
| 25 | +[release version](https://github.com/google/jsinterop-base/releases): |
30 | 26 |
|
31 | 27 | <dependency> |
32 | 28 | <groupId>com.google.jsinterop</groupId> |
33 | 29 | <artifactId>base</artifactId> |
34 | | - <version>1.0.0</version> |
| 30 | + <version>RELEASE_VERSION</version> |
35 | 31 | </dependency> |
36 | 32 |
|
37 | | - |
38 | | -Download the jar file |
39 | | ----------------------- |
40 | | -You can also download manually [the jar file](https://oss.sonatype.org/content/repositories/releases/com/google/jsinterop/base/1.0.0/base-1.0.0.jar). |
41 | | - |
42 | 33 | GWT |
43 | 34 | --- |
44 | 35 | If you use jsinterop-base with [GWT](http://www.gwtproject.org/), you need to |
@@ -81,4 +72,3 @@ Please refer to [the license file](LICENSE). |
81 | 72 | Disclaimer |
82 | 73 | ---------- |
83 | 74 | This is not an official Google product. |
84 | | - |
0 commit comments