Skip to content

Commit

Permalink
[Build] Bundle Grid UI in the Jar
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Aug 22, 2020
1 parent eed8354 commit 5a5bc38
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
3 changes: 3 additions & 0 deletions java/server/src/org/openqa/selenium/grid/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ java_export(
"org.openqa.selenium.grid.config.HasRoles",
"org.openqa.selenium.remote.service.DriverService$Builder",
],
resource_jars = [
"//javascript/grid-ui:react_jar",
],
visibility = [
"//visibility:public",
],
Expand Down
17 changes: 13 additions & 4 deletions javascript/grid-ui/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin", "nodejs_test")
load("@npm//react-scripts:index.bzl", "react_scripts", "react_scripts_test")
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
load("@npm//react-scripts:index.bzl", "react_scripts")
load("@rules_pkg//:pkg.bzl", "pkg_zip")

package(default_visibility = ["//visibility:public"])

_RUNTIME_DEPS = [
"chdir.js",
"copy_static_files",
":copy_static_files",
"@npm//react",
"@npm//react-dom",
"@npm//react-modal",
"@npm//react-apollo",
"@npm//react-json-view",
"@npm//react-router-dom",
"@npm//react-scripts",
"@npm//apollo-cache-inmemory",
"@npm//apollo-client",
"@npm//apollo-link-http",
Expand Down Expand Up @@ -68,3 +68,12 @@ react_scripts(
],
output_dir = True,
)

genrule(
name = "react_jar",
srcs = [
":build"
],
outs = ["react.jar"],
cmd="jar cf $@ $(locations :build)"
)

0 comments on commit 5a5bc38

Please sign in to comment.