Skip to content

Commit

Permalink
Fix the bug that paths of native_libs are incorrectly passed to Apk p…
Browse files Browse the repository at this point in the history
…ackaging actions.

Also writes a test to cover the native deps workflow.

PiperOrigin-RevId: 611293605
Change-Id: Ia3bd56f2a899b474ab588fc442b7c8cc77116d80
  • Loading branch information
Zhaoqing Xu authored and copybara-github committed Feb 29, 2024
1 parent 51465c2 commit a3c000f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rules/apk_packaging.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ def _build_apk(
resources = []
resource_paths = []
for architecture in native_libs:
for native_lib in native_libs[architecture]:
path = "%s:lib/%s/%s" % (native_lib.short_path, architecture, native_lib.basename)
for native_lib in native_libs[architecture].to_list():
path = "%s:lib/%s/%s" % (native_lib.path, architecture, native_lib.basename)
resources.append(native_lib)
resource_paths.append(path)

Expand All @@ -224,7 +224,7 @@ def _build_apk(
resource_paths = []
if native_libs_name:
resources = [native_libs_name]
resource_paths = ["%s%s" % (native_libs_name.short_path, native_libs_name.basename)]
resource_paths = ["%s:%s" % (native_libs_name.path, native_libs_name.basename)]

java.singlejar(
ctx,
Expand Down

0 comments on commit a3c000f

Please sign in to comment.