base_system.mk: Support system_server jars from apexes

Allow system_server jars delivered via apex. Regular system_server
jars are located in /system/framework folder. But, jars delivered via
apex are mounted at /apex/<module_name>/javalib. Also, not all the
libraries in /apex/<module_name>/javalib will be a system_server jar,
so adding a mechanism to list out the jar file explicitly within the
apex module.

Bug: 144722612
Bug: 141785760
Test: Compiles (both with empty & non-empty PRODUCT_SYSTEM_SERVER_APEX_JARS
value set)

Change-Id: Ia181ab22fdf2da575bfd532c1cd90a2f54742528
This commit is contained in:
Roshan Pius 2019-11-22 08:47:40 -08:00
parent 4a0832210c
commit d6e239fc35
3 changed files with 8 additions and 0 deletions

View File

@ -97,6 +97,7 @@ ifeq ($(WRITE_SOONG_VARIABLES),true)
$(call add_json_list, ProductUpdatableBootLocations, $(PRODUCT_UPDATABLE_BOOT_LOCATIONS)) $(call add_json_list, ProductUpdatableBootLocations, $(PRODUCT_UPDATABLE_BOOT_LOCATIONS))
$(call add_json_list, SystemServerJars, $(PRODUCT_SYSTEM_SERVER_JARS)) $(call add_json_list, SystemServerJars, $(PRODUCT_SYSTEM_SERVER_JARS))
$(call add_json_list, SystemServerApps, $(PRODUCT_SYSTEM_SERVER_APPS)) $(call add_json_list, SystemServerApps, $(PRODUCT_SYSTEM_SERVER_APPS))
$(call add_json_list, UpdatableSystemServerJars, $(PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS))
$(call add_json_list, SpeedApps, $(PRODUCT_DEXPREOPT_SPEED_APPS)) $(call add_json_list, SpeedApps, $(PRODUCT_DEXPREOPT_SPEED_APPS))
$(call add_json_list, PreoptFlags, $(PRODUCT_DEX_PREOPT_DEFAULT_FLAGS)) $(call add_json_list, PreoptFlags, $(PRODUCT_DEX_PREOPT_DEFAULT_FLAGS))
$(call add_json_str, DefaultCompilerFilter, $(PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER)) $(call add_json_str, DefaultCompilerFilter, $(PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER))

View File

@ -228,6 +228,8 @@ _product_list_vars += PRODUCT_SYSTEM_PROPERTY_BLACKLIST
_product_list_vars += PRODUCT_VENDOR_PROPERTY_BLACKLIST _product_list_vars += PRODUCT_VENDOR_PROPERTY_BLACKLIST
_product_list_vars += PRODUCT_SYSTEM_SERVER_APPS _product_list_vars += PRODUCT_SYSTEM_SERVER_APPS
_product_list_vars += PRODUCT_SYSTEM_SERVER_JARS _product_list_vars += PRODUCT_SYSTEM_SERVER_JARS
# List of system_server jars delivered via apex. Format = <apex name>:<jar name>.
_product_list_vars += PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS
# All of the apps that we force preopt, this overrides WITH_DEXPREOPT. # All of the apps that we force preopt, this overrides WITH_DEXPREOPT.
_product_list_vars += PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK _product_list_vars += PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK

View File

@ -56,6 +56,11 @@ PRODUCT_SYSTEM_SERVER_JARS := \
wifi-service \ wifi-service \
com.android.location.provider \ com.android.location.provider \
# system server jars which are updated via apex modules.
# The values should be of the format <apex name>:<jar name>
PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS := \
# Ex: com.android.wifi:wifi-service
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
system/core/rootdir/etc/public.libraries.android.txt:system/etc/public.libraries.txt system/core/rootdir/etc/public.libraries.android.txt:system/etc/public.libraries.txt