soong: Add `aapt_version_code` default
This appends to aapt flags, which is
useful for flushing some caches upon system updates.
Change-Id: I4ae1a1939f97f9ce6bb821b0b5687ad48e8ea343
diff --git a/build/soong/Android.bp b/build/soong/Android.bp
index bded9c0..e83fdb9 100644
--- a/build/soong/Android.bp
+++ b/build/soong/Android.bp
@@ -51,6 +51,26 @@
// Target platform agnostic config modules
soong_config_module_type {
+ name: "aapt_version_code",
+ module_type: "java_defaults",
+ config_namespace: "blissGlobalVars",
+ value_variables: ["aapt_version_code"],
+ properties: ["aaptflags"],
+}
+
+aapt_version_code {
+ name: "aapt_version_code_defaults",
+ soong_config_variables: {
+ aapt_version_code: {
+ aaptflags: [
+ "--version-code",
+ "%s",
+ ],
+ },
+ },
+}
+
+soong_config_module_type {
name: "gralloc_10_usage_bits",
module_type: "cc_defaults",
config_namespace: "blissGlobalVars",
diff --git a/config/BoardConfigSoong.mk b/config/BoardConfigSoong.mk
index 9a11299..afe1932 100644
--- a/config/BoardConfigSoong.mk
+++ b/config/BoardConfigSoong.mk
@@ -28,6 +28,7 @@
SOONG_CONFIG_NAMESPACES += blissGlobalVars
SOONG_CONFIG_blissGlobalVars += \
+ aapt_version_code \
additional_gralloc_10_usage_bits \
camera_needs_client_info \
target_init_vendor_lib \
@@ -80,6 +81,7 @@
TARGET_SURFACEFLINGER_UDFPS_LIB ?= surfaceflinger_udfps_lib
# Soong value variables
+SOONG_CONFIG_blissGlobalVars_aapt_version_code := $(shell date -u +%Y%m%d)
SOONG_CONFIG_blissGlobalVars_additional_gralloc_10_usage_bits := $(TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS)
SOONG_CONFIG_blissGlobalVars_target_init_vendor_lib := $(TARGET_INIT_VENDOR_LIB)
SOONG_CONFIG_blissGlobalVars_target_ld_shim_libs := $(subst $(space),:,$(TARGET_LD_SHIM_LIBS))