Skip to content

Commit

Permalink
Add javadoc targets for Guice libraries.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 422867497
  • Loading branch information
java-team-github-bot authored and Guice Team committed Jan 19, 2022
1 parent f7abab4 commit 1c57d16
Show file tree
Hide file tree
Showing 16 changed files with 151 additions and 9 deletions.
49 changes: 49 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,53 @@
load("@google_bazel_common//tools/javadoc:javadoc.bzl", "javadoc_library")

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

package_group(
name = "src",
packages = ["//..."],
)

javadoc_library(
name = "javadoc",
testonly = 1, # some dependencies are testonly,
srcs = [
"//core/src/com/google/inject:javadoc-srcs",
"//extensions/assistedinject/src/com/google/inject/assistedinject:javadoc-srcs",
"//extensions/dagger-adapter/src/com/google/inject/daggeradapter:javadoc-srcs",
"//extensions/grapher/src/com/google/inject/grapher:javadoc-srcs",
"//extensions/jmx/src/com/google/inject/tools/jmx:javadoc-srcs",
"//extensions/jndi/src/com/google/inject/jndi:javadoc-srcs",
"//extensions/persist/src/com/google/inject/persist:javadoc-srcs",
"//extensions/service/src/com/google/inject/service:javadoc-srcs",
"//extensions/servlet/src/com/google/inject/servlet:javadoc-srcs",
"//extensions/spring/src/com/google/inject/spring:javadoc-srcs",
"//extensions/struts2/src/com/google/inject/struts2:javadoc-srcs",
"//extensions/testlib/src/com/google/inject/testing/fieldbinder:javadoc-srcs",
"//extensions/testlib/src/com/google/inject/testing/throwingproviders:javadoc-srcs",
"//extensions/throwingproviders/src/com/google/inject/throwingproviders:javadoc-srcs",
],
doctitle = "Guice Dependency Injection API",
external_javadoc_links = [
"https://google.github.io/guava/releases/30.1-jre/api/docs/",
"https://google.github.io/truth/api/0.45/",
"http://errorprone.info/api/latest/",
"https://tomcat.apache.org/tomcat-5.5-doc/servletapi/",
"http://aopalliance.sourceforge.net/doc/",
],
deps = [
"//core/src/com/google/inject",
"//extensions/assistedinject/src/com/google/inject/assistedinject",
"//extensions/dagger-adapter/src/com/google/inject/daggeradapter",
"//extensions/grapher/src/com/google/inject/grapher",
"//extensions/jmx/src/com/google/inject/tools/jmx",
"//extensions/jndi/src/com/google/inject/jndi",
"//extensions/persist/src/com/google/inject/persist",
"//extensions/service/src/com/google/inject/service",
"//extensions/servlet/src/com/google/inject/servlet",
"//extensions/spring/src/com/google/inject/spring",
"//extensions/struts2/src/com/google/inject/struts2",
"//extensions/testlib/src/com/google/inject/testing/fieldbinder",
"//extensions/testlib/src/com/google/inject/testing/throwingproviders",
"//extensions/throwingproviders/src/com/google/inject/throwingproviders",
],
)
5 changes: 5 additions & 0 deletions core/src/com/google/inject/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,8 @@ java_library(
"//third_party/java/jsr330_inject",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["**/*.java"]),
)
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ java_library(
"//third_party/java/jsr330_inject",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package(

java_library(
name = "daggeradapter",
srcs = glob(["**/*.java"]),
srcs = glob(["*.java"]),
plugins = [
],
deps = [
Expand All @@ -19,3 +19,8 @@ java_library(
"//third_party/java/jsr330_inject",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)
5 changes: 5 additions & 0 deletions extensions/grapher/src/com/google/inject/grapher/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ java_library(
"//third_party/java/guava/collect",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["**/*.java"]),
)
9 changes: 8 additions & 1 deletion extensions/jmx/src/com/google/inject/tools/jmx/BUILD
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Copyright 2011 Google Inc. All rights reserved.
# Author: [email protected] (Sam Berlin)
load("@rules_java//java:defs.bzl", "java_library")

package(
default_visibility = ["//:src"],
)

java_library(
name = "jmx",
srcs = glob(["**/*.java"]),
srcs = glob(["*.java"]),
deps = [
"//core/src/com/google/inject",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)
7 changes: 6 additions & 1 deletion extensions/jndi/src/com/google/inject/jndi/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ package(

java_library(
name = "jndi",
srcs = glob(["**/*.java"]),
srcs = glob(["*.java"]),
deps = [
"//core/src/com/google/inject",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)
7 changes: 7 additions & 0 deletions extensions/mini/src/com/google/inject/mini/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright 2011 Google Inc. All rights reserved.
# Author: [email protected] (Sam Berlin)
load("@rules_java//java:defs.bzl", "java_library")

package(
default_visibility = ["//:src"],
)
Expand All @@ -12,3 +14,8 @@ java_library(
"//third_party/java/jsr330_inject",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)
7 changes: 7 additions & 0 deletions extensions/persist/src/com/google/inject/persist/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright 2011 Google Inc. All rights reserved.
# Author: [email protected] (Sam Berlin)
load("@rules_java//java:defs.bzl", "java_library")

package(
default_visibility = ["//:src"],
)
Expand All @@ -21,3 +23,8 @@ java_library(
"//third_party/java/servlet/servlet_api",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["**/*.java"]),
)
9 changes: 8 additions & 1 deletion extensions/service/src/com/google/inject/service/BUILD
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Copyright 2011 Google Inc. All rights reserved.
# Author: [email protected] (Sam Berlin)
load("@rules_java//java:defs.bzl", "java_library")

package(
default_visibility = ["//:src"],
)

java_library(
name = "service",
srcs = glob(["**/*.java"]),
srcs = glob(["*.java"]),
plugins = [
],
deps = [
Expand All @@ -16,3 +18,8 @@ java_library(
"//third_party/java/guava/util/concurrent",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)
9 changes: 8 additions & 1 deletion extensions/servlet/src/com/google/inject/servlet/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright 2011 Google Inc. All rights reserved.
# Author: [email protected] (Sam Berlin)
load("@rules_java//java:defs.bzl", "java_library")

package(
default_visibility = ["//:src"],
)
Expand All @@ -17,7 +19,7 @@ java_library(
java_library(
name = "servlet",
srcs = glob(
["**/*.java"],
["*.java"],
exclude = ["RequestScoped.java"],
),
plugins = [
Expand All @@ -34,3 +36,8 @@ java_library(
"//third_party/java/servlet/servlet_api",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)
8 changes: 7 additions & 1 deletion extensions/spring/src/com/google/inject/spring/BUILD
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Copyright 2011 Google Inc. All rights reserved.
# Author: [email protected] (Sam Berlin)
load("@rules_java//java:defs.bzl", "java_library")

package(
default_visibility = ["//:src"],
)

java_library(
name = "spring",
srcs = glob(["**/*.java"]),
srcs = glob(["*.java"]),
plugins = [
],
deps = [
Expand All @@ -16,3 +17,8 @@ java_library(
"//third_party/java/spring:beans",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)
8 changes: 7 additions & 1 deletion extensions/struts2/src/com/google/inject/struts2/BUILD
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Copyright 2011 Google Inc. All rights reserved.
# Author: [email protected] (Sam Berlin)
load("@rules_java//java:defs.bzl", "java_library")

package(
default_visibility = ["//:src"],
)

java_library(
name = "struts2",
srcs = glob(["**/*.java"]),
srcs = glob(["*.java"]),
deps = [
"//core/src/com/google/inject",
"//extensions/servlet/src/com/google/inject/servlet",
"//third_party/java/struts2",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Copyright 2014 Google Inc. All rights reserved.
# Author: [email protected] (Russ Harmon)
load("@rules_java//java:defs.bzl", "java_library")

package(
default_testonly = 1,
default_visibility = ["//:src"],
)

java_library(
name = "fieldbinder",
srcs = glob(["**/*.java"]),
srcs = glob(["*.java"]),
plugins = [
],
deps = [
Expand All @@ -18,3 +20,8 @@ java_library(
"//third_party/java/jsr330_inject",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

package(
default_testonly = 1,
default_visibility = ["//:src"],
Expand All @@ -12,3 +14,8 @@ java_library(
"//third_party/java/truth",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Copyright 2011 Google Inc. All rights reserved.
# Author: [email protected] (Sam Berlin)
load("@rules_java//java:defs.bzl", "java_library")

package(
default_visibility = ["//:src"],
)

java_library(
name = "throwingproviders",
srcs = glob(["**/*.java"]),
srcs = glob(["*.java"]),
plugins = [
],
deps = [
Expand All @@ -17,3 +19,8 @@ java_library(
"//third_party/java/jsr305_annotations",
],
)

filegroup(
name = "javadoc-srcs",
srcs = glob(["*.java"]),
)

0 comments on commit 1c57d16

Please sign in to comment.