1# Description: 2# TensorFlow Lite Support API in Java. 3 4load("@org_tensorflow//tensorflow/java:build_defs.bzl", "JAVACOPTS") 5load("@build_bazel_rules_android//android:rules.bzl", "android_library") 6 7package( 8 default_visibility = ["//visibility:public"], 9 licenses = ["notice"], # Apache 2.0 10) 11 12exports_files([ 13 "AndroidManifest.xml", 14 "default_version_script.lds", 15 "debug_version_script.lds", 16]) 17 18# Android Library target for TFLite Support Library. It depends on TensorFlow 19# Lite runtime (tensorflow/lite/java:tensorflowlite). If you don't want to 20# introduce the native library into dependencies, use 21# "tensorflowlite_support_java" instead, which depends on 22# tensorflow/lite/java:tensorflowlite_java. 23android_library( 24 name = "tensorflowlite_support", 25 srcs = glob( 26 ["src/java/org/tensorflow/lite/support/**/*.java"], 27 ), 28 javacopts = JAVACOPTS, 29 manifest = "AndroidManifest.xml", 30 deps = [ 31 "@org_checkerframework_qual", 32 "@org_tensorflow//tensorflow/lite/java:tensorflowlite", 33 ], 34) 35 36android_library( 37 name = "tensorflowlite_support_java", 38 srcs = glob( 39 ["src/java/org/tensorflow/lite/support/**/*.java"], 40 ), 41 javacopts = JAVACOPTS, 42 manifest = "AndroidManifest.xml", 43 deps = [ 44 "@org_checkerframework_qual", 45 "@org_tensorflow//tensorflow/lite/java:tensorflowlite_java", 46 ], 47) 48 49# TODO(b/156482505): Remove this target. 50alias( 51 name = "tensorflow-lite-support-nogpu", 52 actual = ":tensorflow-lite-support", 53) 54 55# This alias matches the associated .aar library name output style. 56alias( 57 name = "tensorflow-lite-support", 58 actual = ":tensorflowlite_support", 59) 60 61java_library( 62 name = "tensorflowlite_support_precondition_lib", 63 srcs = ["src/java/org/tensorflow/lite/support/common/SupportPreconditions.java"], 64 javacopts = JAVACOPTS, 65 deps = [ 66 "@org_checkerframework_qual", 67 ], 68) 69 70android_library( 71 name = "tensorflowlite_support_precondition", 72 srcs = ["src/java/org/tensorflow/lite/support/common/SupportPreconditions.java"], 73 javacopts = JAVACOPTS, 74 manifest = "AndroidManifest.xml", 75 deps = [ 76 "@org_checkerframework_qual", 77 ], 78) 79