From adb240ee11d9c108307cf4fc9ecb7b607e8a2282 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Thu, 7 May 2020 22:45:27 +0200 Subject: [PATCH] Add missing javax.annotation dependency Fixes #483. --- closure/repositories.bzl | 13 +++++++++++++ java/io/bazel/rules/closure/BUILD | 1 + java/io/bazel/rules/closure/webfiles/BUILD | 1 + java/io/bazel/rules/closure/worker/BUILD | 1 + 4 files changed, 16 insertions(+) diff --git a/closure/repositories.bzl b/closure/repositories.bzl index 7d54f6035e..0bb393771e 100644 --- a/closure/repositories.bzl +++ b/closure/repositories.bzl @@ -61,6 +61,7 @@ def rules_closure_dependencies( omit_com_squareup_javapoet = False, omit_fonts_noto_hinted_deb = False, omit_fonts_noto_mono_deb = False, + omit_javax_annotation_api = False, omit_javax_annotation_jsr250_api = False, omit_javax_inject = False, omit_libexpat_amd64_deb = False, @@ -151,6 +152,8 @@ def rules_closure_dependencies( fonts_noto_hinted_deb() if not omit_fonts_noto_mono_deb: fonts_noto_mono_deb() + if not omit_javax_annotation_api: + javax_annotation_api() if not omit_javax_annotation_jsr250_api: javax_annotation_jsr250_api() if not omit_javax_inject: @@ -838,6 +841,16 @@ def fonts_noto_mono_deb(): sha256 = "71ff715cf50a74a8cc11b02e7c906b69a242d3d677e739e0b2d18cd23b7de375", ) +def javax_annotation_api(): + java_import_external( + name = "javax_annotation_api", + licenses = ["reciprocal"], + jar_sha256 = "e04ba5195bcd555dc95650f7cc614d151e4bcd52d29a10b8aa2197f3ab89ab9b", + jar_urls = [ + "https://repo1.maven.org/maven2/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar", + ], + ) + def javax_annotation_jsr250_api(): java_import_external( name = "javax_annotation_jsr250_api", diff --git a/java/io/bazel/rules/closure/BUILD b/java/io/bazel/rules/closure/BUILD index 14e0ed96c0..d2945b5183 100644 --- a/java/io/bazel/rules/closure/BUILD +++ b/java/io/bazel/rules/closure/BUILD @@ -44,6 +44,7 @@ java_library( deps = [ "@com_google_auto_value", "@com_google_guava", + "@javax_annotation_api", ], ) diff --git a/java/io/bazel/rules/closure/webfiles/BUILD b/java/io/bazel/rules/closure/webfiles/BUILD index 81be71046b..4f397bd2a8 100644 --- a/java/io/bazel/rules/closure/webfiles/BUILD +++ b/java/io/bazel/rules/closure/webfiles/BUILD @@ -33,6 +33,7 @@ java_library( "@com_google_dagger", "@com_google_guava", "@com_google_protobuf//:protobuf_java", + "@javax_annotation_api", "@javax_inject", "@org_jsoup", ], diff --git a/java/io/bazel/rules/closure/worker/BUILD b/java/io/bazel/rules/closure/worker/BUILD index e0957f8be8..e03095d1ea 100644 --- a/java/io/bazel/rules/closure/worker/BUILD +++ b/java/io/bazel/rules/closure/worker/BUILD @@ -33,6 +33,7 @@ java_library( "@com_google_dagger", "@com_google_guava", "@com_google_protobuf//:protobuf_java", + "@javax_annotation_api", ], )