From 574cb9ead9f978a37cd04100d7098a0e90135dab Mon Sep 17 00:00:00 2001 From: Nelson Li Date: Thu, 25 Apr 2024 08:03:44 +0000 Subject: [PATCH] Refactor product inheritance for caiman products Add an additional layer of inheritance for `aosp_caiman`, and `aosp_caiman_fullmte`. This change adds a common layer of inheritance for non-factory products (caiman_generic.mk). This makes it easier to configure factory and non-factory products differently. Non-factory `caiman` products now inherits from `device/google/caimito/caiman_generic.mk` which inherit from `device/google/caimito/device-caiman.mk`. aconfig flags: Flag: EXEMPT mechanical refactoring build flags: Flag: EXEMPT mechanical refactoring Bug: 336452008 Bug: 336707436 Test: lunch aosp_caiman-trunk_staging-userdebug && m lunch aosp_caiman_fullmte-trunk_staging-userdebug && m Change-Id: Idc9c0e6862f10e2b2543637804af588b382395d9 --- aosp_caiman.mk | 2 +- caiman_generic.mk | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 caiman_generic.mk diff --git a/aosp_caiman.mk b/aosp_caiman.mk index 44d9a523..54314020 100644 --- a/aosp_caiman.mk +++ b/aosp_caiman.mk @@ -20,7 +20,7 @@ USE_SWIFTSHADER := false BOARD_USES_SWIFTSHADER := false $(call inherit-product, device/google/zumapro/aosp_common.mk) -$(call inherit-product, device/google/caimito/device-caiman.mk) +$(call inherit-product, device/google/caimito/caiman_generic.mk) PRODUCT_NAME := aosp_caiman PRODUCT_DEVICE := caiman diff --git a/caiman_generic.mk b/caiman_generic.mk new file mode 100644 index 00000000..6b8acb18 --- /dev/null +++ b/caiman_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/caimito/device-caiman.mk)