From 6831e8e19effac5c25b3218571a0f9bbc89aab26 Mon Sep 17 00:00:00 2001 From: Alex Rodionov Date: Thu, 28 Mar 2024 12:54:25 -0700 Subject: [PATCH] [bazel] Restore javadoc targets --- MODULE.bazel | 6 ++++++ java/src/org/openqa/selenium/BUILD.bazel | 14 +++++++++++++- java/src/org/openqa/selenium/grid/BUILD.bazel | 15 +++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index b82628577b8f5..a3b58a5979a2a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -124,6 +124,12 @@ use_repo(pip, "py_dev_requirements") register_toolchains("@pythons_hub//:all") +single_version_override( + module_name = "rules_jvm_external", + patches = ["//java:rules_jvm_external_javadoc.patch"], + patch_strip = 1, +) + java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains") use_repo( java_toolchains, diff --git a/java/src/org/openqa/selenium/BUILD.bazel b/java/src/org/openqa/selenium/BUILD.bazel index 63315009368ef..8a26ac79a8f4a 100644 --- a/java/src/org/openqa/selenium/BUILD.bazel +++ b/java/src/org/openqa/selenium/BUILD.bazel @@ -1,4 +1,4 @@ -load("//java:defs.bzl", "java_dist_zip", "java_export", "java_import") +load("//java:defs.bzl", "java_dist_zip", "java_export", "java_import", "javadoc") load("//java:version.bzl", "SE_VERSION") load("//java/src/org/openqa/selenium/devtools:versions.bzl", "CDP_DEPS") @@ -71,6 +71,18 @@ java_dist_zip( ], ) +javadoc( + name = "client-javadoc", + third_party_prefixes = [ + "@", + "//third_party", + ] + CDP_DEPS, + transitive = True, + deps = [ + ":client-combined", + ], +) + java_import( name = "manifest", jars = [ diff --git a/java/src/org/openqa/selenium/grid/BUILD.bazel b/java/src/org/openqa/selenium/grid/BUILD.bazel index 90fd0de2121fa..cf915977bb161 100644 --- a/java/src/org/openqa/selenium/grid/BUILD.bazel +++ b/java/src/org/openqa/selenium/grid/BUILD.bazel @@ -6,9 +6,11 @@ load( "java_dist_zip", "java_export", "java_library", + "javadoc", "merge_jars", ) load("//java:version.bzl", "SE_VERSION") +load("//java/src/org/openqa/selenium/devtools:versions.bzl", "CDP_DEPS") genrule( name = "executable-grid", @@ -208,3 +210,16 @@ java_dist_zip( ":grid", ], ) + +javadoc( + name = "all-javadocs", + third_party_prefixes = [ + "@", + "//third_party", + ] + CDP_DEPS, + transitive = True, + deps = [ + ":grid", + "//java/src/org/openqa/selenium:client-combined", + ], +)