Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa7ecfb7 authored by Dan Willemsen's avatar Dan Willemsen
Browse files

Clean LOCAL_RESOURCE_DIR paths

With LOCAL_USE_AAPT2, resource directories like a/b/../res cause
problems, since ninja will canonicalize the path before creating the
intermediate resource directory, so it creates <intermediates>/a/res
while we give AAPT2 <intermediates>/a/b/../res, which fails to open.

Bug: 37716307
Test: Switch LOCAL_USE_AAPT2:=true for TelecommUnitTests, mma
Test: lunch aosp_marlin-userdebug; m -j
Change-Id: Id0d167e68185a119390e7b7e3c344895e77ca0e3
parent 5ec6bbc3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -92,6 +92,7 @@ ifeq (,$(LOCAL_RESOURCE_DIR))
  LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
else
  need_compile_res := true
  LOCAL_RESOURCE_DIR := $(foreach d,$(LOCAL_RESOURCE_DIR),$(call clean-path,$(d)))
endif

package_resource_overlays := $(strip \
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ need_compile_res :=
# A static Java library needs to explicily set LOCAL_RESOURCE_DIR.
ifdef LOCAL_RESOURCE_DIR
need_compile_res := true
LOCAL_RESOURCE_DIR := $(foreach d,$(LOCAL_RESOURCE_DIR),$(call clean-path,$(d)))
endif
ifdef LOCAL_USE_AAPT2
ifneq ($(LOCAL_STATIC_ANDROID_LIBRARIES),)