| load("@rules_java//java:defs.bzl", "java_library") | |
| package( | |
| default_applicable_licenses = ["//:license"], | |
| default_visibility = ["//src/main/java/com/google/devtools/build/lib:build_lib"], | |
| ) | |
| filegroup( | |
| name = "srcs", | |
| srcs = glob(["**"]) + [ | |
| "//src/main/java/com/google/devtools/build/lib/concurrent/safeexecutor:srcs", | |
| ], | |
| visibility = ["//src/main/java/com/google/devtools/build/lib:__pkg__"], | |
| ) | |
| # Library of concurrency utilities. | |
| java_library( | |
| name = "concurrent", | |
| srcs = glob( | |
| ["*.java"], | |
| exclude = [ | |
| "CancellableTask.java", | |
| "SettableFutureKeyedValue.java", | |
| "TaskDeduplicator.java", | |
| "ThreadSafety.java", | |
| ], | |
| ), | |
| deps = [ | |
| ":thread_safety", | |
| "//src/main/java/com/google/devtools/build/lib/concurrent/safeexecutor:safe_executor", | |
| "//third_party/java/flogger", | |
| "//third_party/java/guava:annotations", | |
| "//third_party/java/guava:base", | |
| "//third_party/java/guava:collect", | |
| "//third_party/java/guava:concurrent", | |
| "//third_party/java/guava:primitives", | |
| "//third_party/java/jsr305_annotations", | |
| ], | |
| ) | |
| java_library( | |
| name = "cancellable_task", | |
| srcs = ["CancellableTask.java"], | |
| deps = [ | |
| "//third_party/java/error_prone:annotations", | |
| "//third_party/java/guava:concurrent", | |
| "//third_party/java/jsr305_annotations", | |
| ], | |
| ) | |
| java_library( | |
| name = "thread_safety", | |
| srcs = ["ThreadSafety.java"], | |
| visibility = ["//src/main/java/com/google/devtools/build/lib:build_lib"], | |
| ) | |
| java_library( | |
| name = "settable_future_keyed_value", | |
| srcs = ["SettableFutureKeyedValue.java"], | |
| deps = [ | |
| "//third_party/java/guava:base", | |
| "//third_party/java/guava:concurrent", | |
| ], | |
| ) | |
| java_library( | |
| name = "task_deduplicator", | |
| srcs = ["TaskDeduplicator.java"], | |
| deps = [ | |
| "//third_party/java/error_prone:annotations", | |
| "//third_party/java/guava:annotations", | |
| "//third_party/java/guava:concurrent", | |
| "//third_party/java/jsr305_annotations", | |
| ], | |
| ) |