diff --git a/core/product.mk b/core/product.mk index 4250253465..60cab47b5b 100644 --- a/core/product.mk +++ b/core/product.mk @@ -456,6 +456,10 @@ _product_single_value_vars += PRODUCT_BUILD_FROM_SOURCE_STUB _product_list_vars += PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS +_product_single_value_vars += PRODUCT_HIDDEN_API_EXPORTABLE_STUBS + +_product_single_value_vars += PRODUCT_EXPORT_RUNTIME_APIS + .KATI_READONLY := _product_single_value_vars _product_list_vars _product_var_list :=$= $(_product_single_value_vars) $(_product_list_vars) diff --git a/core/soong_config.mk b/core/soong_config.mk index ec0c70eb6f..b43a9526fc 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -400,6 +400,10 @@ $(call end_json_map) $(call add_json_bool, BuildFromSourceStub, $(findstring true,$(PRODUCT_BUILD_FROM_SOURCE_STUB) $(BUILD_FROM_SOURCE_STUB))) +$(call add_json_bool, HiddenapiExportableStubs, $(filter true,$(PRODUCT_HIDDEN_API_EXPORTABLE_STUBS))) + +$(call add_json_bool, ExportRuntimeApis, $(filter true,$(PRODUCT_EXPORT_RUNTIME_APIS))) + $(call json_end) $(file >$(SOONG_VARIABLES).tmp,$(json_contents)) diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk index 76b1c58064..07eb96db2a 100644 --- a/target/product/AndroidProducts.mk +++ b/target/product/AndroidProducts.mk @@ -67,6 +67,7 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/mainline_system_x86_arm.mk \ $(LOCAL_DIR)/ndk.mk \ $(LOCAL_DIR)/sdk.mk \ + $(LOCAL_DIR)/sdk_with_runtime_apis.mk \ endif diff --git a/target/product/sdk_with_runtime_apis.mk b/target/product/sdk_with_runtime_apis.mk new file mode 100644 index 0000000000..e80b4fb600 --- /dev/null +++ b/target/product/sdk_with_runtime_apis.mk @@ -0,0 +1,22 @@ +# +# Copyright (C) 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, $(SRC_TARGET_DIR)/product/sdk.mk) + +PRODUCT_NAME := sdk_with_runtime_apis + +PRODUCT_HIDDEN_API_EXPORTABLE_STUBS := true +PRODUCT_EXPORT_RUNTIME_APIS := true \ No newline at end of file