message: Add java_library_with_tflite and java_test_with_tflite build macros.
diff: @@ -113,6 +113,68 @@ def cc_test_with_tflite(
  **kwargs
  )
  +def java_library_with_tflite(
  + name,
  + deps = [],
  + tflite_deps = [],
  + exports = [],
  + tflite_exports = [],
  + **kwargs):
  + """Defines an java_library that uses the TFLite shims.
  +
  + This is a hook to allow applying different build flags (etc.)
  + for targets that use the TFLite shims.
  +
  + Note that this build rule doesn't itself add any dependencies on
  + TF Lite; this macro should normally be used in conjunction with a
  + direct or indirect 'tflite_deps' dependency on one of the "shim"
  + library targets from //third_party/tensorflow/lite/core/shims:*.
  +
  + Args:
  + name: as for java_library.
  + deps: as for java_library.
  + tflite_deps: dependencies on rules that are themselves defined using
  + 'cc_library_with_tflite' / 'java_library_with_tflite'.
  + exports: same as for java_library.
  + tflite_exports: exported dependencies that are themselves defined using
  + 'cc_library_with_tflite' / 'java_library_with_tflite'.
  + **kwargs: Additional java_library parameters.
  + """
  + native.java_library(
  + name = name,
  + exports = exports + tflite_exports,
  + deps = deps + tflite_deps,
  + **kwargs
  + )
  +
  +def java_test_with_tflite(
  + name,
  + deps = [],
  + tflite_deps = [],
  + **kwargs):
  + """Defines an java_library that uses the TFLite shims.
  +
  + This is a hook to allow applying different build flags (etc.)
  + for targets that use the TFLite shims.
  +
  + Note that this build rule doesn't itself add any dependencies on
  + TF Lite; this macro should normally be used in conjunction with a
  + direct or indirect 'tflite_deps' dependency on one of the "shim"
  + library targets from //third_party/tensorflow/lite/core/shims:*.
  +
  + Args:
  + name: as for java_library.
  + deps: as for java_library.
  + tflite_deps: dependencies on rules that are themselves defined using
  + 'cc_library_with_tflite' / 'java_library_with_tflite'.
  + **kwargs: Additional java_library parameters.
  + """
  + native.java_test(
  + name = name,
  + deps = deps + tflite_deps,
  + **kwargs
  + )
  +
  def jni_binary_with_tflite(
  name,
  deps = [],
  