omni: Add ROM_BUILDTYPE Weekly soong module
Needed for update_engine where backuptool is only requiered on this ROM_BUILDTYPE
Change-Id: I82d78db0f01ca6ce2483a0021ad384381bca6d62
diff --git a/config/Android.bp b/config/Android.bp
index a9449cc..cdef68e 100644
--- a/config/Android.bp
+++ b/config/Android.bp
@@ -23,6 +23,25 @@
}
soong_config_module_type {
+ name: "omni_weekly_build",
+ module_type: "cc_defaults",
+ config_namespace: "omniGlobalVars",
+ bool_variables: [
+ "useWeekly",
+ ],
+ properties: ["export_cflags"],
+}
+
+omni_weekly_build {
+ name: "omni_weekly_build_defaults",
+ soong_config_variables: {
+ useWeekly: {
+ export_cflags: ["-DUSE_WEEKLY_BUILD"],
+ },
+ },
+}
+
+soong_config_module_type {
name: "aapt_version_code",
module_type: "java_defaults",
config_namespace: "omniGlobalVars",
diff --git a/config/BoardConfigSoong.mk b/config/BoardConfigSoong.mk
index 9ca2268..ce0ad6f 100644
--- a/config/BoardConfigSoong.mk
+++ b/config/BoardConfigSoong.mk
@@ -38,6 +38,7 @@
launcher3Mock \
targetNeedsHWCOnFirstRef \
uses_metadata_as_fde_key \
+ useWeekly \
target_use_sdclang \
target_camera_needs_client_info \
target_enforce_ab_ota_partition_list
@@ -79,6 +80,7 @@
SOONG_CONFIG_omniGlobalVars_launcher3Gapps ?= false
SOONG_CONFIG_omniGlobalVars_launcher3Mock ?= false
+SOONG_CONFIG_omniGlobalVars_useWeekly ?= false
# Soong value variables
SOONG_CONFIG_omniGlobalVars_additional_gralloc_10_usage_bits := $(TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS)
@@ -90,3 +92,7 @@
else
SOONG_CONFIG_omniGlobalVars_launcher3Mock := true
endif
+
+ifeq ($(ROM_BUILDTYPE),WEEKLY)
+ SOONG_CONFIG_omniGlobalVars_useWeekly := true
+endif