message: Update aar_with_jni for tflite to take list of files for headers, and preserve file names.
  files will be added in a directory "headers" in the aar
diff: @@ -13,7 +13,7 @@ def aar_with_jni(
  android_library: The `android_library` target to package. Note that the
  AAR will contain *only that library's .jar` sources. It does not
  package the transitive closure of all Java source dependencies.
  - headers: Optional Fileset of headers that will be included in the
  + headers: Optional list of headers that will be included in the
  generated .aar file. This is useful for distributing self-contained
  .aars with native libs that can be used directly by native clients.
  """
  @@ -64,11 +64,15 @@ zip -r $$origdir/$(location :{1}.aar) jni/*/*.so
  """.format(android_library, name)
  if headers:
  - srcs += [headers]
  + srcs += headers
  cmd += """
  -cp -rL $$origdir/$(location {0}) headers
  -zip -r $$origdir/$(location :{1}.aar) headers
  -""".format(headers, name)
  + mkdir headers
  + """
  + for src in headers:
  + cmd += """
  + cp -rL $$origdir/$(location {0}) headers/$$(basename $(location {0}))
  + """.format(src)
  + cmd += "zip -r $$origdir/$(location :{0}.aar) headers".format(name)
  native.genrule(
  name = name,
  