diff options
author | qiaoli <qiaoli@google.com> | 2023-03-23 17:52:48 +0000 |
---|---|---|
committer | qiaoli <qiaoli@google.com> | 2023-03-23 17:52:51 +0000 |
commit | b5bfcfa3e944f6641f698d83280d295d941aa41a (patch) | |
tree | ae96f863acb88b99d88f30ec2da11339fc925361 | |
parent | 8cabf61d47d96c1873b42f5203e54030e9817543 (diff) | |
download | tensorflow-b5bfcfa3e944f6641f698d83280d295d941aa41a.tar.gz |
Add tensorflow core java proto library
Bug: 274487854
Test: mma
Change-Id: Ia15c2cbadf738018eb7455d054f9da5f36e529b5
-rw-r--r-- | Android.bp | 30 | ||||
-rw-r--r-- | tensorflow/lite/delegates/Android.bp | 2 |
2 files changed, 29 insertions, 3 deletions
diff --git a/Android.bp b/Android.bp index 7cbcbc3fd7e..f3ffc15982f 100644 --- a/Android.bp +++ b/Android.bp @@ -162,7 +162,7 @@ cc_library_static { ], whole_static_libs: [ "libdoubleconversion", - "tensorflow_core_proto_all", + "tensorflow_core_proto_cpp_lite", ], shared_libs: [ "libz", @@ -249,7 +249,7 @@ filegroup( ) cc_library { - name: "tensorflow_core_proto_all", + name: "tensorflow_core_proto_cpp_lite", proto: { export_proto_headers: true, canonical_path_from_root: false, @@ -273,3 +273,29 @@ cc_library { ], export_include_dirs: ["."], } + +java_library_static { + name: "tensorflow_core_proto_java_lite", + srcs: [ + "tensorflow/core/framework/*.proto", + "tensorflow/core/example/example.proto", + "tensorflow/core/example/feature.proto", + "tensorflow/core/example/example_parser_configuration.proto", + "tensorflow/core/profiler/protobuf/xplane.proto", + "tensorflow/core/profiler/profiler_options.proto", + "tensorflow/core/util/saved_tensor_slice.proto", + "tensorflow/core/util/event.proto", + ":tensorflow_core_protobuf_src", + ":libprotobuf-internal-protos", + ], + proto: { + canonical_path_from_root: false, + include_dirs: [ + "external/protobuf/src", + "external/protobuf/java", + ], + type: "lite", + }, + static_libs: ["libprotobuf-java-lite"], + apex_available: ["com.android.ondevicepersonalization"], +} diff --git a/tensorflow/lite/delegates/Android.bp b/tensorflow/lite/delegates/Android.bp index aaed4efd634..7e3465f4727 100644 --- a/tensorflow/lite/delegates/Android.bp +++ b/tensorflow/lite/delegates/Android.bp @@ -35,7 +35,7 @@ cc_library_static { ], static_libs: [ "tensorflow_abseil", - "tensorflow_core_proto_all", + "tensorflow_core_proto_cpp_lite", "libtensorflow_core_mobile_srcs_only_runtime", ], header_libs: [ |