diff --git a/build/soong/Android.bp b/build/soong/Android.bp index 21304ee0..18e9a841 100644 --- a/build/soong/Android.bp +++ b/build/soong/Android.bp @@ -2,6 +2,7 @@ bootstrap_go_package { name: "soong-lineage", pkgPath: "lineage/soong/android", srcs: [ + "android/config.go", "android/variable.go", ], } diff --git a/build/soong/android/config.go b/build/soong/android/config.go new file mode 100644 index 00000000..e926c9d8 --- /dev/null +++ b/build/soong/android/config.go @@ -0,0 +1,13 @@ +package android + +// Global config used by Lineage soong additions +var LineageConfig = struct { + // List of packages that are permitted + // for java source overlays. + JavaSourceOverlayModuleWhitelist []string +}{ + // JavaSourceOverlayModuleWhitelist + []string{ + "org.lineageos.hardware", + }, +} diff --git a/build/soong/android/variable.go b/build/soong/android/variable.go index 5e992ca3..27f1e2ef 100644 --- a/build/soong/android/variable.go +++ b/build/soong/android/variable.go @@ -30,6 +30,7 @@ type Product_variables struct { type ProductVariables struct { Additional_gralloc_10_usage_bits *string `json:",omitempty"` Has_legacy_camera_hal1 *bool `json:",omitempty"` + Java_Source_Overlays *string `json:",omitempty"` Needs_text_relocations *bool `json:",omitempty"` Specific_camera_parameter_library *string `json:",omitempty"` Target_shim_libs *string `json:",omitempty"` diff --git a/build/soong/soong_config.mk b/build/soong/soong_config.mk index accd4671..852ee844 100644 --- a/build/soong/soong_config.mk +++ b/build/soong/soong_config.mk @@ -5,6 +5,7 @@ _contents := $(_contents) "Lineage":{$(newline) # See build/core/soong_config.mk for the add_json_* functions you can use here. $(call add_json_str_omitempty, Additional_gralloc_10_usage_bits, $(TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS)) $(call add_json_bool, Has_legacy_camera_hal1, $(filter true,$(TARGET_HAS_LEGACY_CAMERA_HAL1))) +$(call add_json_str, Java_Source_Overlays, $(JAVA_SOURCE_OVERLAYS)) $(call add_json_bool, Needs_text_relocations, $(filter true,$(TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS))) $(call add_json_str, Specific_camera_parameter_library, $(TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY)) $(call add_json_str, Target_shim_libs, $(TARGET_LD_SHIM_LIBS))