From e6678e8cfd64aae8a5a0e71807e80845a08dc6d1 Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Thu, 14 Dec 2017 15:14:08 -0600 Subject: [PATCH] Include build manifest on target Private repos can be excluded by setting the env var MANIFEST_EXCLUDES | delimited. proprietary is always excluded. Change-Id: I9a085a7102d9905853636e0ad60ac6f80a930ae0 --- config/Android.mk | 33 +++++++++++++++++++++++++++++++++ config/common.mk | 4 ++++ 2 files changed, 37 insertions(+) create mode 100644 config/Android.mk diff --git a/config/Android.mk b/config/Android.mk new file mode 100644 index 00000000..90ce7831 --- /dev/null +++ b/config/Android.mk @@ -0,0 +1,33 @@ +# Copyright (C) 2023 The LineageOS 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. + +ifdef MANIFEST_EXCLUDES +MANIFEST_EXCLUDES := |$(MANIFEST_EXCLUDES) +endif + +include $(CLEAR_VARS) + +LOCAL_MODULE := build-manifest +LOCAL_MODULE_SUFFIX := .xml +LOCAL_MODULE_CLASS := ETC +LOCAL_PRODUCT_MODULE := true + +_build-manifest_intermediates := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE)) +_build-manifest_xml := $(_build-manifest_intermediates)/$(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX) + +$(_build-manifest_xml): + mkdir -p $(dir $@) + python3 .repo/repo/repo manifest -o - -r | grep -Ev "proprietary_$(MANIFEST_EXCLUDES)" > $@ + +include $(BUILD_SYSTEM)/base_rules.mk diff --git a/config/common.mk b/config/common.mk index cdf67f6d..4d97d6d8 100644 --- a/config/common.mk +++ b/config/common.mk @@ -105,6 +105,10 @@ TARGET_SCREEN_HEIGHT ?= 1920 PRODUCT_PACKAGES += \ bootanimation.zip +# Build Manifest +PRODUCT_PACKAGES += \ + build-manifest + # Lineage packages PRODUCT_PACKAGES += \ LineageParts \