Bruno Martins | 9265e40 | 2022-01-14 19:00:42 +0000 | [diff] [blame] | 1 | # |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 2 | # Copyright (C) 2015 The CyanogenMod Project |
Bruno Martins | 9265e40 | 2022-01-14 19:00:42 +0000 | [diff] [blame] | 3 | # 2017-2022 The LineageOS Project |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
Bruno Martins | 9265e40 | 2022-01-14 19:00:42 +0000 | [diff] [blame] | 16 | # |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
LuK1337 | 31ed872 | 2020-09-15 02:29:56 +0200 | [diff] [blame] | 19 | include $(CLEAR_VARS) |
| 20 | |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 21 | # We have a special case here where we build the library's resources |
| 22 | # independently from its code, so we need to find where the resource |
| 23 | # class source got placed in the course of building the resources. |
| 24 | # Thus, the magic here. |
| 25 | # Also, this module cannot depend directly on the R.java file; if it |
| 26 | # did, the PRIVATE_* vars for R.java wouldn't be guaranteed to be correct. |
| 27 | # Instead, it depends on the R.stamp file, which lists the corresponding |
| 28 | # R.java file as a prerequisite. |
Sam Mortimer | d6ad885 | 2018-08-08 23:27:12 -0700 | [diff] [blame] | 29 | lineage_platform_res := APPS/org.lineageos.platform-res_intermediates/aapt |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 30 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 31 | # List of packages used in lineage-api-stubs |
Bruno Martins | 7242fc8 | 2022-01-14 21:08:33 +0000 | [diff] [blame] | 32 | lineage_stub_packages := lineageos.app:lineageos.content:lineageos.hardware:lineageos.media:lineageos.os:lineageos.preference:lineageos.profiles:lineageos.providers:lineageos.platform:lineageos.util:lineageos.trust |
d34d | f2fd836 | 2016-03-04 16:07:39 -0800 | [diff] [blame] | 33 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 34 | lineage_framework_module := $(LOCAL_INSTALLED_MODULE) |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 35 | |
| 36 | # Make sure that R.java and Manifest.java are built before we build |
| 37 | # the source for this library. |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 38 | lineage_framework_res_R_stamp := \ |
| 39 | $(call intermediates-dir-for,APPS,org.lineageos.platform-res,,COMMON)/src/R.stamp |
Colin Cross | 3276a6b | 2017-10-11 21:34:17 -0700 | [diff] [blame] | 40 | LOCAL_ADDITIONAL_DEPENDENCIES := $(lineage_framework_res_R_stamp) |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 41 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 42 | $(lineage_framework_module): | $(dir $(lineage_framework_module))org.lineageos.platform-res.apk |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 43 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 44 | lineage_framework_built := $(call java-lib-deps, org.lineageos.platform) |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 45 | |
Roman Birg | 620b1eb | 2016-03-22 14:21:05 -0700 | [diff] [blame] | 46 | # the sdk as an aar for publish, not built as part of full target |
Adnan Begovic | bbab82e | 2016-01-05 14:15:09 -0800 | [diff] [blame] | 47 | # DO NOT LINK AGAINST THIS IN BUILD |
| 48 | # ============================================================ |
| 49 | include $(CLEAR_VARS) |
| 50 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 51 | LOCAL_MODULE := org.lineageos.platform.sdk.aar |
Roman Birg | 620b1eb | 2016-03-22 14:21:05 -0700 | [diff] [blame] | 52 | |
Adnan Begovic | bbab82e | 2016-01-05 14:15:09 -0800 | [diff] [blame] | 53 | LOCAL_JACK_ENABLED := disabled |
| 54 | |
Jorge Ruesga | c6550fd | 2016-04-29 14:27:41 +0200 | [diff] [blame] | 55 | LOCAL_CONSUMER_PROGUARD_FILE := $(LOCAL_PATH)/sdk/proguard.txt |
Adnan Begovic | bbab82e | 2016-01-05 14:15:09 -0800 | [diff] [blame] | 56 | |
Roman Birg | 620b1eb | 2016-03-22 14:21:05 -0700 | [diff] [blame] | 57 | LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, sdk/res/res) |
| 58 | LOCAL_MANIFEST_FILE := sdk/AndroidManifest.xml |
Adnan Begovic | bbab82e | 2016-01-05 14:15:09 -0800 | [diff] [blame] | 59 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 60 | lineage_sdk_exclude_files := 'lineageos/library' |
| 61 | LOCAL_JAR_EXCLUDE_PACKAGES := $(lineage_sdk_exclude_files) |
Adnan Begovic | 62604cf | 2016-04-13 09:51:21 -0700 | [diff] [blame] | 62 | LOCAL_JAR_EXCLUDE_FILES := none |
| 63 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 64 | LOCAL_STATIC_JAVA_LIBRARIES := org.lineageos.platform.sdk |
Adnan Begovic | bbab82e | 2016-01-05 14:15:09 -0800 | [diff] [blame] | 65 | |
| 66 | include $(BUILD_STATIC_JAVA_LIBRARY) |
Roman Birg | 620b1eb | 2016-03-22 14:21:05 -0700 | [diff] [blame] | 67 | $(LOCAL_MODULE) : $(built_aar) |
Adnan Begovic | bbab82e | 2016-01-05 14:15:09 -0800 | [diff] [blame] | 68 | |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 69 | # =========================================================== |
| 70 | # Common Droiddoc vars |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 71 | lineage_platform_docs_src_files := \ |
| 72 | $(call all-java-files-under, $(lineage_sdk_src)) \ |
| 73 | $(call all-html-files-under, $(lineage_sdk_src)) |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 74 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 75 | lineage_platform_docs_java_libraries := \ |
Sam Mortimer | 3533d38 | 2019-05-13 15:28:04 -0700 | [diff] [blame] | 76 | org.lineageos.platform.sdk |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 77 | |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 78 | # SDK version as defined |
Michael Bestas | 3031b61 | 2018-01-01 03:20:01 +0200 | [diff] [blame] | 79 | lineage_platform_docs_SDK_VERSION := 15.1 |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 80 | |
| 81 | # release version |
Joey | fdd21f4 | 2018-03-11 15:15:29 +0100 | [diff] [blame] | 82 | lineage_platform_docs_SDK_REL_ID := 9 |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 83 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 84 | lineage_platform_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 85 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 86 | lineage_platform_docs_LOCAL_DROIDDOC_SOURCE_PATH := \ |
| 87 | $(lineage_platform_docs_src_files) |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 88 | |
Sam Mortimer | 0bc9141 | 2017-09-19 21:16:40 -0700 | [diff] [blame] | 89 | lineage_platform_docs_LOCAL_ADDITIONAL_JAVA_DIR := \ |
| 90 | $(call intermediates-dir-for,JAVA_LIBRARIES,org.lineageos.platform.sdk,,COMMON) |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 91 | |
| 92 | # ==== the api stubs and current.xml =========================== |
| 93 | include $(CLEAR_VARS) |
| 94 | |
| 95 | LOCAL_SRC_FILES:= \ |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 96 | $(lineage_platform_docs_src_files) |
| 97 | LOCAL_INTERMEDIATE_SOURCES:= $(lineage_platform_LOCAL_INTERMEDIATE_SOURCES) |
| 98 | LOCAL_JAVA_LIBRARIES:= $(lineage_platform_docs_java_libraries) |
| 99 | LOCAL_MODULE_CLASS:= $(lineage_platform_docs_LOCAL_MODULE_CLASS) |
| 100 | LOCAL_DROIDDOC_SOURCE_PATH:= $(lineage_platform_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
Sam Mortimer | 0bc9141 | 2017-09-19 21:16:40 -0700 | [diff] [blame] | 101 | LOCAL_ADDITIONAL_JAVA_DIR:= $(lineage_platform_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 102 | LOCAL_ADDITIONAL_DEPENDENCIES:= $(lineage_platform_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 103 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 104 | LOCAL_MODULE := lineage-api-stubs |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 105 | |
dianlujitao | 2cf37e4 | 2017-12-07 21:52:29 +0800 | [diff] [blame] | 106 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:= external/doclava/res/assets/templates-sdk |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 107 | |
Ying Wang | d42a658 | 2015-07-16 14:20:22 -0700 | [diff] [blame] | 108 | LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/lineage-sdk_stubs_current_intermediates/src |
| 109 | |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 110 | LOCAL_DROIDDOC_OPTIONS:= \ |
smain@google.com | 8b35643 | 2016-09-01 19:52:17 -0700 | [diff] [blame] | 111 | -referenceonly \ |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 112 | -stubpackages $(lineage_stub_packages) \ |
| 113 | -exclude org.lineageos.platform.internal \ |
| 114 | -api $(INTERNAL_LINEAGE_PLATFORM_API_FILE) \ |
| 115 | -removedApi $(INTERNAL_LINEAGE_PLATFORM_REMOVED_API_FILE) \ |
Adnan Begovic | c02c64b | 2016-02-09 11:05:20 -0800 | [diff] [blame] | 116 | -nodocs |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 117 | |
| 118 | LOCAL_UNINSTALLABLE_MODULE := true |
| 119 | |
Sam Mortimer | 29e2f6b | 2019-09-05 14:52:51 -0700 | [diff] [blame] | 120 | #include $(BUILD_DROIDDOC) |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 121 | |
Adnan Begovic | 7bdcaa5 | 2015-12-22 11:04:08 -0800 | [diff] [blame] | 122 | # $(gen), i.e. framework.aidl, is also needed while building against the current stub. |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 123 | $(full_target): $(lineage_framework_built) $(gen) |
| 124 | $(INTERNAL_LINEAGE_PLATFORM_API_FILE): $(full_target) |
| 125 | $(call dist-for-goals,sdk,$(INTERNAL_LINEAGE_PLATFORM_API_FILE)) |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 126 | |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 127 | |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 128 | # Documentation |
| 129 | # =========================================================== |
| 130 | include $(CLEAR_VARS) |
| 131 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 132 | LOCAL_MODULE := org.lineageos.platform.sdk |
| 133 | LOCAL_INTERMEDIATE_SOURCES:= $(lineage_platform_LOCAL_INTERMEDIATE_SOURCES) |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 134 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 135 | LOCAL_MODULE_TAGS := optional |
| 136 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 137 | LOCAL_SRC_FILES := $(lineage_platform_docs_src_files) |
Sam Mortimer | 0bc9141 | 2017-09-19 21:16:40 -0700 | [diff] [blame] | 138 | LOCAL_ADDITONAL_JAVA_DIR := $(lineage_platform_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 139 | |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 140 | LOCAL_IS_HOST_MODULE := false |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 141 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := vendor/lineage/build/tools/droiddoc/templates-lineage-sdk |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 142 | LOCAL_ADDITIONAL_DEPENDENCIES := \ |
Paul Keith | eb05519 | 2019-02-19 17:38:01 +0100 | [diff] [blame] | 143 | services |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 144 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 145 | LOCAL_JAVA_LIBRARIES := $(lineage_platform_docs_java_libraries) |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 146 | |
| 147 | LOCAL_DROIDDOC_OPTIONS := \ |
Jeff Sharkey | d153962 | 2017-04-24 18:06:20 -0600 | [diff] [blame] | 148 | -android \ |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 149 | -offlinemode \ |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 150 | -exclude org.lineageos.platform.internal \ |
| 151 | -hidePackage org.lineageos.platform.internal \ |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 152 | -hdf android.whichdoc offline \ |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 153 | -hdf sdk.version $(lineage_platform_docs_docs_SDK_VERSION) \ |
| 154 | -hdf sdk.rel.id $(lineage_platform_docs_docs_SDK_REL_ID) \ |
Adnan Begovic | 62c951e | 2015-05-28 16:13:04 -0700 | [diff] [blame] | 155 | -hdf sdk.preview 0 \ |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 156 | -since $(LINEAGE_SRC_API_DIR)/1.txt 1 \ |
| 157 | -since $(LINEAGE_SRC_API_DIR)/2.txt 2 \ |
| 158 | -since $(LINEAGE_SRC_API_DIR)/3.txt 3 \ |
| 159 | -since $(LINEAGE_SRC_API_DIR)/4.txt 4 \ |
| 160 | -since $(LINEAGE_SRC_API_DIR)/5.txt 5 \ |
| 161 | -since $(LINEAGE_SRC_API_DIR)/6.txt 6 \ |
Michael Bestas | 3031b61 | 2018-01-01 03:20:01 +0200 | [diff] [blame] | 162 | -since $(LINEAGE_SRC_API_DIR)/7.txt 7 \ |
Joey | fdd21f4 | 2018-03-11 15:15:29 +0100 | [diff] [blame] | 163 | -since $(LINEAGE_SRC_API_DIR)/8.txt 8 \ |
| 164 | -since $(LINEAGE_SRC_API_DIR)/9.txt 9 |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 165 | |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 166 | $(full_target): $(lineage_framework_built) $(gen) |
Sam Mortimer | 29e2f6b | 2019-09-05 14:52:51 -0700 | [diff] [blame] | 167 | #include $(BUILD_DROIDDOC) |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 168 | |
Adnan Begovic | 37fc76f | 2015-05-05 17:37:05 -0700 | [diff] [blame] | 169 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
| 170 | |
Adnan Begovic | aa8614e | 2015-04-23 23:16:27 -0700 | [diff] [blame] | 171 | # Cleanup temp vars |
| 172 | # =========================================================== |
Sam Mortimer | 542742b | 2017-09-18 19:44:11 -0700 | [diff] [blame] | 173 | lineage_platform_docs_src_files := |
| 174 | lineage_platform_docs_java_libraries := |
Sam Mortimer | 0bc9141 | 2017-09-19 21:16:40 -0700 | [diff] [blame] | 175 | lineage_platform_docs_LOCAL_ADDITIONAL_JAVA_DIR := |