From 7b45c49c65022f9667ca388e2ec9e83c2b2c48c2 Mon Sep 17 00:00:00 2001 From: Nelson Li Date: Mon, 29 Apr 2024 02:57:55 +0000 Subject: [PATCH] Refactor product inheritance for comet products Add an additional layer of inheritance for `aosp_comet`. This change adds a common layer of inheritance for non-factory products (comet_generic.mk). This makes it easier to configure factory and non-factory products differently. Non-factory `comet` products now inherits from `device/google/comet/comet_generic.mk` which inherit from `device/google/comet/device-comet.mk`. aconfig flags: Flag: EXEMPT mechanical refactoring build flags: Flag: EXEMPT mechanical refactoring Bug: 336452008 Bug: 336707612 Test: lunch aosp_comet-trunk_staging-userdebug && m Change-Id: I22306fbe0eadc217d61a19ebd163265f9d0f12a0 --- aosp_comet.mk | 2 +- comet_generic.mk | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 comet_generic.mk diff --git a/aosp_comet.mk b/aosp_comet.mk index 8314211..c874834 100644 --- a/aosp_comet.mk +++ b/aosp_comet.mk @@ -17,7 +17,7 @@ TARGET_LINUX_KERNEL_VERSION := 6.1 $(call inherit-product, device/google/zumapro/aosp_common.mk) -$(call inherit-product, device/google/comet/device-comet.mk) +$(call inherit-product, device/google/comet/comet_generic.mk) PRODUCT_NAME := aosp_comet PRODUCT_DEVICE := comet diff --git a/comet_generic.mk b/comet_generic.mk new file mode 100644 index 0000000..0036010 --- /dev/null +++ b/comet_generic.mk @@ -0,0 +1,17 @@ +# +# Copyright 2024 The Android Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +$(call inherit-product, device/google/comet/device-comet.mk)