Skip to content

Commit a894470

Browse files
jDramaixcopybara-github
authored andcommitted
Update README instructions to make them release agnostic.
In the future we won't need to update the README for each release. PiperOrigin-RevId: 788627622
1 parent 27d8a8d commit a894470

1 file changed

Lines changed: 11 additions & 21 deletions

File tree

README.md

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,35 @@
1-
# JsInterop Base · [![Build Status](https://github.com/google/jsinterop-base/actions/workflows/ci.yaml/badge.svg)](https://github.com/google/jsinterop-base/actions/workflows/ci.yaml)
1+
# JsInterop Base · ![Latest Release](https://img.shields.io/github/v/release/google/jsinterop-base) · [![Build Status](https://github.com/google/jsinterop-base/actions/workflows/ci.yaml/badge.svg)](https://github.com/google/jsinterop-base/actions/workflows/ci.yaml)
22

33
jsInterop-base contains a set of utilities that cannot be expressed with
44
Jsinterop itself and allows GWT and J2CL projects to write certain JavaScript
55
expressions with pure Java.
66

77
Bazel dependency
88
----------------
9-
If your project uses [Bazel](https://bazel.build), add this repository as an
10-
external dependency in your `WORKSPACE` file:
119

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>")
2014
```
2115

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):
2418

19+
Then add `@jsinterop_base//:jsinterop-base-j2cl` to your `j2cl_library` deps.
2520

2621
Maven dependency
2722
------------------
2823
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):
3026

3127
<dependency>
3228
<groupId>com.google.jsinterop</groupId>
3329
<artifactId>base</artifactId>
34-
<version>1.0.0</version>
30+
<version>RELEASE_VERSION</version>
3531
</dependency>
3632

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-
4233
GWT
4334
---
4435
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).
8172
Disclaimer
8273
----------
8374
This is not an official Google product.
84-

0 commit comments

Comments
 (0)