Skip to content

Commit

Permalink
#devinfra Android targets don't use JAVACOPTS.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 372226338
  • Loading branch information
jdduke authored and xunkai55 committed Aug 2, 2021
1 parent 6af7fe9 commit 0d16c3f
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 21 deletions.
6 changes: 3 additions & 3 deletions tensorflow_lite_support/java/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android_library(
srcs = glob(
["src/java/org/tensorflow/lite/support/**/*.java"],
),
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
manifest = "AndroidManifest.xml",
deps = [
"@com_google_auto_value",
Expand All @@ -40,7 +40,7 @@ android_library(
srcs = glob(
["src/java/org/tensorflow/lite/support/**/*.java"],
),
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
manifest = "AndroidManifest.xml",
# LINT.IfChange(dep)
deps = [
Expand Down Expand Up @@ -70,7 +70,7 @@ java_library(
android_library(
name = "tensorflowlite_support_precondition",
srcs = ["src/java/org/tensorflow/lite/support/common/SupportPreconditions.java"],
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
manifest = "AndroidManifest.xml",
deps = [
"@org_checkerframework_qual",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
load("@build_bazel_rules_android//android:rules.bzl", "android_library")
load("@org_tensorflow//tensorflow/java:build_defs.bzl", "JAVACOPTS")

package(
default_visibility = ["//tensorflow_lite_support:users"],
Expand Down Expand Up @@ -27,7 +26,7 @@ android_library(
android_library(
name = "audio_classifier_java",
srcs = [":audio_classifier_src"],
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
manifest = "//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/audio:AndroidManifest.xml",
deps = [
"//tensorflow_lite_support/java:tensorflowlite_support_java",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
load("@build_bazel_rules_android//android:rules.bzl", "android_library")
load("@org_tensorflow//tensorflow/java:build_defs.bzl", "JAVACOPTS")

package(
default_visibility = ["//tensorflow_lite_support:users"],
Expand All @@ -9,7 +8,7 @@ package(
android_library(
name = "base-task-api",
srcs = glob(["**/*.java"]),
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
visibility = ["//visibility:public"],
# LINT.IfChange(dep)
deps = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
load("@org_tensorflow//tensorflow/lite/core/shims:cc_library_with_tflite.bzl", "android_library_with_tflite")
load("@org_tensorflow//tensorflow/lite/java:aar_with_jni.bzl", "aar_with_jni")
load("@org_tensorflow//tensorflow/java:build_defs.bzl", "JAVACOPTS")

package(
default_visibility = ["//tensorflow_lite_support:users"],
Expand All @@ -15,7 +14,7 @@ android_library_with_tflite(
"//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/text/nlclassifier:nl_classifier_src",
"//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/text/qa:bert_question_answerer_src",
],
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
manifest = "AndroidManifest.xml",
tflite_exports = [
"//tensorflow_lite_support/java/src/native/task/text:task_text_native",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@org_tensorflow//tensorflow/java:build_defs.bzl", "JAVACOPTS")
load("@org_tensorflow//tensorflow/lite/core/shims:cc_library_with_tflite.bzl", "android_library_with_tflite")
load("@org_tensorflow//tensorflow/lite/java:aar_with_jni.bzl", "aar_with_jni")
load("@build_bazel_rules_android//android:rules.bzl", "android_library")
Expand Down Expand Up @@ -33,7 +32,7 @@ android_library(
srcs = [
"NLClassifier.java",
],
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
deps = [
"//tensorflow_lite_support/java:tensorflowlite_support_java",
"//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/core:base_task_api",
Expand All @@ -57,7 +56,7 @@ android_library_with_tflite(
srcs = [
"BertNLClassifier.java",
],
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
tflite_exports = [
"//tensorflow_lite_support/java/src/native/task/text/nlclassifier/bert:bert_nl_classifier_native",
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@org_tensorflow//tensorflow/java:build_defs.bzl", "JAVACOPTS")
load("@org_tensorflow//tensorflow/lite/core/shims:cc_library_with_tflite.bzl", "android_library_with_tflite")
load("@org_tensorflow//tensorflow/lite/java:aar_with_jni.bzl", "aar_with_jni")
load("@build_bazel_rules_android//android:rules.bzl", "android_library")
Expand Down Expand Up @@ -31,7 +30,7 @@ android_library_with_tflite(
android_library(
name = "bert_question_answerer_java",
srcs = glob(["*.java"]),
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
deps = [
"//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/core:base_task_api",
"@org_tensorflow//tensorflow/lite/java:tensorflowlite_java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ android_library_with_tflite(
"//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision/detector:object_detector_src",
"//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision/segmenter:image_segmenter_src",
],
# TODO(b/163039980): Use JAVACOPTS in TF. "-Xep:RemoveUnusedImports:ERROR" wierdly break the build.
javacopts = ["-source 7 -target 7"],
manifest = "AndroidManifest.xml",
tflite_exports = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
load("@build_bazel_rules_android//android:rules.bzl", "android_library")
load("@org_tensorflow//tensorflow/lite/core/shims:cc_library_with_tflite.bzl", "android_library_with_tflite")
load("@org_tensorflow//tensorflow/lite/java:aar_with_jni.bzl", "aar_with_jni")
load("@org_tensorflow//tensorflow/java:build_defs.bzl", "JAVACOPTS")

package(
default_visibility = ["//tensorflow_lite_support:users"],
Expand Down Expand Up @@ -37,7 +36,7 @@ android_library(
srcs = glob(["*.java"]) + [
"//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision/core:base_vision_api_src",
],
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
manifest = "AndroidManifest.xml",
deps = [
"//tensorflow_lite_support/java:tensorflowlite_support_java",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
load("@build_bazel_rules_android//android:rules.bzl", "android_library")
load("@org_tensorflow//tensorflow/lite/core/shims:cc_library_with_tflite.bzl", "android_library_with_tflite")
load("@org_tensorflow//tensorflow/lite/java:aar_with_jni.bzl", "aar_with_jni")
load("@org_tensorflow//tensorflow/java:build_defs.bzl", "JAVACOPTS")

package(
default_visibility = ["//tensorflow_lite_support:users"],
Expand Down Expand Up @@ -37,7 +36,7 @@ android_library(
srcs = glob(["*.java"]) + [
"//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision/core:base_vision_api_src",
],
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
manifest = "AndroidManifest.xml",
deps = [
"//tensorflow_lite_support/java:tensorflowlite_support_java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ android_library(
srcs = glob(["*.java"]) + [
"//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision/core:base_vision_api_src",
],
# TODO(b/163039980): Use JAVACOPTS in TF. "-Xep:RemoveUnusedImports:ERROR" wierdly break the build.
javacopts = ["-source 7 -target 7"],
manifest = "AndroidManifest.xml",
deps = [
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_lite_support/metadata/java/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ METADATA_SRCS = glob(
android_library(
name = "tensorflowlite_support_metadata",
srcs = METADATA_SRCS,
javacopts = JAVACOPTS,
javacopts = ["-source 7 -target 7"],
manifest = "AndroidManifest.xml",
deps = [
"//tensorflow_lite_support/metadata:metadata_schema_fbs_android",
Expand Down

0 comments on commit 0d16c3f

Please sign in to comment.