File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change
1
+ """Configures how Java libraries should be built in TFLite Support."""
2
+
3
+ # Forked from TF Java build_defs.bzl, but add more options for TFLS.
4
+
5
+ load (
6
+ "@org_tensorflow//tensorflow/java:build_defs.bzl" ,
7
+ TF_EP_ENABLED_WARNINGS = "EP_ENABLED_WARNINGS" ,
8
+ TF_JAVA_VERSION_OPTS = "JAVA_VERSION_OPTS" ,
9
+ TF_XLINT_OPTS = "XLINT_OPTS" ,
10
+ )
11
+
12
+ # We need "release 7" to resolve ByteBuffer incompatibility in Java versions.
13
+ # https://www.morling.dev/blog/bytebuffer-and-the-dreaded-nosuchmethoderror/
14
+
15
+ JAVA_VERSION_OPTS = TF_JAVA_VERSION_OPTS + ["--release 7" ]
16
+
17
+ JAVACOPTS = TF_JAVA_VERSION_OPTS + TF_XLINT_OPTS + TF_EP_ENABLED_WARNINGS
Original file line number Diff line number Diff line change 2
2
# TensorFlow Lite Support API in Java for metadata.
3
3
4
4
load ("@build_bazel_rules_android//android:rules.bzl" , "android_library" )
5
- load ("@org_tensorflow//tensorflow /java:build_defs.bzl" , "JAVACOPTS" )
5
+ load ("//tensorflow_lite_support /java:build_defs.bzl" , "JAVACOPTS" )
6
6
7
7
package (
8
8
default_visibility = ["//visibility:public" ],
You can’t perform that action at this time.
0 commit comments