1#
2# Copyright (C) 2021 Google Inc.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17# TODO: Remove this once the APEX is included in base system.
18
19# To include the APEX in your build, insert this in your device.mk:
20#   $(call inherit-product, packages/modules/Virtualization/apex/product_packages.mk)
21
22# If devices supports AVF it implies that it uses non-flattened APEXes.
23$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
24
25PRODUCT_PACKAGES += \
26    com.android.compos \
27
28# TODO(b/207336449): Figure out how to get these off /system
29PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST := \
30    system/framework/oat/%@service-compos.jar@classes.odex \
31    system/framework/oat/%@service-compos.jar@classes.vdex \
32
33PRODUCT_APEX_SYSTEM_SERVER_JARS := com.android.compos:service-compos
34
35PRODUCT_SYSTEM_EXT_PROPERTIES := ro.config.isolated_compilation_enabled=true
36
37PRODUCT_FSVERITY_GENERATE_METADATA := true
38
39PRODUCT_AVF_ENABLED := true
40
41# The cheap build flags dependency management system until there is a proper one.
42ifdef RELEASE_AVF_ENABLE_DEVICE_ASSIGNMENT
43  ifndef RELEASE_AVF_ENABLE_VENDOR_MODULES
44    $(error RELEASE_AVF_ENABLE_VENDOR_MODULES must also be enabled)
45  endif
46endif
47
48ifdef RELEASE_AVF_ENABLE_LLPVM_CHANGES
49  ifndef RELEASE_AVF_ENABLE_DICE_CHANGES
50    $(error RELEASE_AVF_ENABLE_DICE_CHANGES must also be enabled)
51  endif
52endif
53
54ifdef RELEASE_AVF_ENABLE_REMOTE_ATTESTATION
55  ifndef RELEASE_AVF_ENABLE_DICE_CHANGES
56    $(error RELEASE_AVF_ENABLE_DICE_CHANGES must also be enabled)
57  endif
58endif
59