From e56636b6d120ca796bf824e84aec628031c9c408 Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Wed, 2 Aug 2023 14:04:17 -0700 Subject: [PATCH] internal change PiperOrigin-RevId: 553250547 --- .../com/google/mediapipe/tasks/core/BUILD | 17 +++++++-- .../com/google/mediapipe/tasks/vision/BUILD | 35 ++++++++++++++++--- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/mediapipe/tasks/java/com/google/mediapipe/tasks/core/BUILD b/mediapipe/tasks/java/com/google/mediapipe/tasks/core/BUILD index eb658c0e2..e8d3b1c61 100644 --- a/mediapipe/tasks/java/com/google/mediapipe/tasks/core/BUILD +++ b/mediapipe/tasks/java/com/google/mediapipe/tasks/core/BUILD @@ -16,6 +16,20 @@ package(default_visibility = ["//visibility:public"]) android_library( name = "core", + javacopts = [ + "-Xep:AndroidJdkLibsChecker:OFF", + ], + manifest = "AndroidManifest.xml", + exports = [ + ":core_java", + "//mediapipe/java/com/google/mediapipe/framework:android_framework", + "//mediapipe/tasks/java/com/google/mediapipe/tasks/core/jni:model_resources_cache_jni", + ], + deps = ["@maven//:com_google_guava_guava"], +) + +android_library( + name = "core_java", srcs = glob(["*.java"]), javacopts = [ "-Xep:AndroidJdkLibsChecker:OFF", @@ -27,11 +41,10 @@ android_library( "//mediapipe/calculators/tensor:inference_calculator_java_proto_lite", "//mediapipe/framework:calculator_java_proto_lite", "//mediapipe/framework:calculator_options_java_proto_lite", - "//mediapipe/java/com/google/mediapipe/framework:android_framework", + "//mediapipe/java/com/google/mediapipe/framework:android_framework_no_mff", "//mediapipe/tasks/cc/core/proto:acceleration_java_proto_lite", "//mediapipe/tasks/cc/core/proto:base_options_java_proto_lite", "//mediapipe/tasks/cc/core/proto:external_file_java_proto_lite", - "//mediapipe/tasks/java/com/google/mediapipe/tasks/core/jni:model_resources_cache_jni", "//third_party:any_java_proto", "//third_party:autovalue", "@com_google_protobuf//:protobuf_javalite", diff --git a/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/BUILD b/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/BUILD index cbb1797e2..aab542842 100644 --- a/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/BUILD +++ b/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/BUILD @@ -18,16 +18,27 @@ package(default_visibility = ["//visibility:public"]) android_library( name = "core", + javacopts = [ + "-Xep:AndroidJdkLibsChecker:OFF", + ], + exports = [ + ":core_java", + ":libmediapipe_tasks_vision_jni_lib", + "//mediapipe/tasks/java/com/google/mediapipe/tasks/core", + ], +) + +android_library( + name = "core_java", srcs = glob(["core/*.java"]), javacopts = [ "-Xep:AndroidJdkLibsChecker:OFF", ], deps = [ - ":libmediapipe_tasks_vision_jni_lib", "//mediapipe/framework/formats:rect_java_proto_lite", "//mediapipe/java/com/google/mediapipe/framework:android_framework_no_mff", "//mediapipe/java/com/google/mediapipe/framework/image", - "//mediapipe/tasks/java/com/google/mediapipe/tasks/core", + "//mediapipe/tasks/java/com/google/mediapipe/tasks/core:core_java", "//third_party:autovalue", "@maven//:com_google_guava_guava", ], @@ -246,6 +257,20 @@ android_library( android_library( name = "imagesegmenter", + javacopts = [ + "-Xep:AndroidJdkLibsChecker:OFF", + ], + manifest = "imagesegmenter/AndroidManifest.xml", + exports = [ + ":core", + ":imagesegmenter_java", + "//mediapipe/tasks/java/com/google/mediapipe/tasks/core", + ], + deps = ["@maven//:com_google_guava_guava"], +) + +android_library( + name = "imagesegmenter_java", srcs = [ "imagesegmenter/ImageSegmenter.java", "imagesegmenter/ImageSegmenterResult.java", @@ -255,15 +280,15 @@ android_library( ], manifest = "imagesegmenter/AndroidManifest.xml", deps = [ - ":core", + ":core_java", "//mediapipe/framework:calculator_options_java_proto_lite", - "//mediapipe/java/com/google/mediapipe/framework:android_framework", + "//mediapipe/java/com/google/mediapipe/framework:android_framework_no_mff", "//mediapipe/java/com/google/mediapipe/framework/image", "//mediapipe/tasks/cc/core/proto:base_options_java_proto_lite", "//mediapipe/tasks/cc/vision/image_segmenter/calculators:tensors_to_segmentation_calculator_java_proto_lite", "//mediapipe/tasks/cc/vision/image_segmenter/proto:image_segmenter_graph_options_java_proto_lite", "//mediapipe/tasks/cc/vision/image_segmenter/proto:segmenter_options_java_proto_lite", - "//mediapipe/tasks/java/com/google/mediapipe/tasks/core", + "//mediapipe/tasks/java/com/google/mediapipe/tasks/core:core_java", "//third_party:autovalue", "@maven//:com_google_guava_guava", ],