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

Commit fd5fa347 authored by Colin Cross's avatar Colin Cross
Browse files

Don't pass --legacy by default to aapt2 compile

Don't pass --legacy by default, it is rarely necessary and converts
some errors into warnings that crash at runtime.  The modules that
need it have had --legacy added to LOCAL_AAPT_FLAGS.

Bug: 135597368
Test: m java
Change-Id: I0cb213599d6612746d988b8966cbd529b5328db0
parent 18f28c77
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1883,20 +1883,20 @@ endef
###########################################################
define aapt2-compile-one-resource-file
@mkdir -p $(dir $@)
$(hide) $(AAPT2) compile -o $(dir $@) $(PRIVATE_AAPT2_CFLAGS) --legacy $<
$(hide) $(AAPT2) compile -o $(dir $@) $(PRIVATE_AAPT2_CFLAGS) $<
endef

define aapt2-compile-resource-dirs
@mkdir -p $(dir $@)
$(hide) $(AAPT2) compile -o $@ $(addprefix --dir ,$(PRIVATE_SOURCE_RES_DIRS)) \
  $(PRIVATE_AAPT2_CFLAGS) --legacy
  $(PRIVATE_AAPT2_CFLAGS)
endef

# TODO(b/74574557): use aapt2 compile --zip if it gets implemented
define aapt2-compile-resource-zips
@mkdir -p $(dir $@)
$(ZIPSYNC) -d $@.contents -l $@.list $(PRIVATE_SOURCE_RES_ZIPS)
$(hide) $(AAPT2) compile -o $@ --dir $@.contents $(PRIVATE_AAPT2_CFLAGS) --legacy
$(hide) $(AAPT2) compile -o $@ --dir $@.contents $(PRIVATE_AAPT2_CFLAGS)
endef

# Set up rule to compile one resource file with aapt2.