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

Commit 4c69c2ff authored by Ulya Trafimovich's avatar Ulya Trafimovich
Browse files

Use two-column format for PRODUCT_BOOT_JARS components.

The first component is the apex name, or a special name "platform"
if the boot jar is a platform jar rather than a part of some apex.
This is a prerequisite change for moving core-icu4j to a separate
com.android.i18n apex.

Old one-column format is still supported, but all unqualified
components of PRODUCT_BOOT_JARS get "platform:" prepended to them
after reading the product makefiles.

Test: aosp_walleye-userdebug boots
Bug: 138994281
Change-Id: I0f79c7d10477880ca65354251a5d1ca0b7ce79ab
parent a9800b4d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -258,7 +258,13 @@ endef
# java code with dalvikvm/art.
# Jars present in the ART apex. These should match exactly the list of
# Java libraries in the ART apex build rule.
ART_APEX_JARS := core-oj core-libart core-icu4j okhttp bouncycastle apache-xml
ART_APEX_JARS := \
    com.android.art:core-oj \
    com.android.art:core-libart \
    com.android.art:core-icu4j \
    com.android.art:okhttp \
    com.android.art:bouncycastle \
    com.android.art:apache-xml
#################################################################

# Read the product specs so we can get TARGET_DEVICE and other
+3 −3
Original line number Diff line number Diff line
@@ -501,9 +501,9 @@ else # !LOCAL_PROGUARD_ENABLED
	$(transform-classes.jar-to-dex)
endif

ifneq ($(filter $(LOCAL_MODULE),$(PRODUCT_BOOT_JARS)),)
  $(call pretty-error,Modules in PRODUCT_BOOT_JARS must be defined in Android.bp files)
endif
$(foreach pair,$(PRODUCT_BOOT_JARS), \
  $(if $(filter $(LOCAL_MODULE),$(call word-colon,2,$(pair))), \
    $(call pretty-error,Modules in PRODUCT_BOOT_JARS must be defined in Android.bp files)))

$(built_dex): $(built_dex_intermediate)
	@echo Copying: $@
+3 −3
Original line number Diff line number Diff line
@@ -35,9 +35,9 @@ ifeq ($(prebuilt_module_is_dex_javalib),true)
my_dex_jar := $(my_prebuilt_src_file)
# This is a target shared library, i.e. a jar with classes.dex.

ifneq ($(filter $(LOCAL_MODULE),$(PRODUCT_BOOT_JARS)),)
  $(call pretty-error,Modules in PRODUCT_BOOT_JARS must be defined in Android.bp files)
endif
$(foreach pair,$(PRODUCT_BOOT_JARS), \
  $(if $(filter $(LOCAL_MODULE),$(call word-colon,2,$(pair))), \
    $(call pretty-error,Modules in PRODUCT_BOOT_JARS must be defined in Android.bp files)))

ALL_MODULES.$(my_register_name).CLASSES_JAR := $(common_classes_jar)

+7 −5
Original line number Diff line number Diff line
@@ -231,6 +231,10 @@ PRODUCT_AAPT_CONFIG := $(subst $(space),$(comma),$(PRODUCT_AAPT_CONFIG))
# Extra boot jars must be appended at the end after common boot jars.
PRODUCT_BOOT_JARS += $(PRODUCT_BOOT_JARS_EXTRA)

# Add 'platform:' prefix to unqualified boot jars
PRODUCT_BOOT_JARS := $(foreach pair,$(PRODUCT_BOOT_JARS), \
  $(if $(findstring :,$(pair)),,platform:)$(pair))

# The extra system server jars must be appended at the end after common system server jars.
PRODUCT_SYSTEM_SERVER_JARS += $(PRODUCT_SYSTEM_SERVER_JARS_EXTRA)

@@ -271,11 +275,9 @@ ifdef PRODUCT_DEFAULT_DEV_CERTIFICATE
endif

$(foreach pair,$(PRODUCT_UPDATABLE_BOOT_JARS), \
  $(if $(findstring $(call word-colon,2,$(pair)),$(PRODUCT_BOOT_JARS)), \
    $(error A jar in PRODUCT_UPDATABLE_BOOT_JARS must not be in PRODUCT_BOOT_JARS, \
      but $(call word-colon,2,$(pair)) is) \
  ) \
)
  $(eval jar := $(call word-colon,2,$(pair))) \
  $(if $(findstring $(jar), $(PRODUCT_BOOT_JARS)), \
    $(error A jar in PRODUCT_UPDATABLE_BOOT_JARS must not be in PRODUCT_BOOT_JARS, but $(jar) is)))

ENFORCE_SYSTEM_CERTIFICATE := $(PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT)
ENFORCE_SYSTEM_CERTIFICATE_WHITELIST := $(PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_WHITELIST)
+2 −1
Original line number Diff line number Diff line
@@ -91,7 +91,8 @@ endif # LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE

ifdef LOCAL_SOONG_DEX_JAR
  ifndef LOCAL_IS_HOST_MODULE
    ifneq ($(filter $(LOCAL_MODULE),$(PRODUCT_BOOT_JARS)),)  # is_boot_jar
    boot_jars := $(foreach pair,$(PRODUCT_BOOT_JARS), $(call word-colon,2,$(pair)))
    ifneq ($(filter $(LOCAL_MODULE),$(boot_jars)),) # is_boot_jar
      ifeq (true,$(WITH_DEXPREOPT))
        # For libart, the boot jars' odex files are replaced by $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE).
        # We use this installed_odex trick to get boot.art installed.
Loading