diff options
author | Nan Zhang | 2018-08-22 23:05:29 -0500 |
---|---|---|
committer | android-build-merger | 2018-08-22 23:05:29 -0500 |
commit | c264546c9b31b1360e7cf380ed30cbd789f40534 (patch) | |
tree | a7f17a0b10d4afd42ca1b3ec10f36cbb5f6f44d8 | |
parent | fd5ee634457a2f9440c70a98e914d3f3edf04cd7 (diff) | |
parent | 3a799f755a51d52a7f9d317b7fc446dcd0487788 (diff) | |
download | platform-packages-services-car-c264546c9b31b1360e7cf380ed30cbd789f40534.tar.gz platform-packages-services-car-c264546c9b31b1360e7cf380ed30cbd789f40534.tar.xz platform-packages-services-car-c264546c9b31b1360e7cf380ed30cbd789f40534.zip |
Migrate android.car Droiddoc to Soong am: 110f615f78
am: 3a799f755a
Change-Id: Ic622d2dd59932204f540271c71b692c9ac265a2b
-rw-r--r-- | Android.mk | 13 | ||||
-rw-r--r-- | apicheck.mk | 286 | ||||
-rw-r--r-- | apicheck_msg_current.txt | 14 | ||||
-rw-r--r-- | apicheck_msg_last.txt | 5 | ||||
-rw-r--r-- | car-lib/Android.bp | 127 | ||||
-rw-r--r-- | car-lib/Android.mk | 82 | ||||
-rw-r--r-- | car-lib/api/released/1.txt (renamed from car-lib/api/1.txt) | 0 | ||||
-rw-r--r-- | car-lib/api/released/2.txt (renamed from car-lib/api/2.txt) | 0 | ||||
-rw-r--r-- | car-lib/api/system-released/system-1.txt (renamed from car-lib/api/system-1.txt) | 0 | ||||
-rw-r--r-- | car-lib/api/system-released/system-2.txt (renamed from car-lib/api/system-2.txt) | 0 | ||||
-rw-r--r-- | car-support-lib/Android.bp | 103 | ||||
-rw-r--r-- | car-support-lib/Android.mk | 57 |
12 files changed, 233 insertions, 454 deletions
@@ -12,21 +12,8 @@ | |||
12 | # See the License for the specific language governing permissions and | 12 | # See the License for the specific language governing permissions and |
13 | # limitations under the License. | 13 | # limitations under the License. |
14 | # | 14 | # |
15 | # | ||
16 | |||
17 | LOCAL_PATH := $(call my-dir) | 15 | LOCAL_PATH := $(call my-dir) |
18 | include $(CLEAR_VARS) | 16 | include $(CLEAR_VARS) |
19 | 17 | ||
20 | CAR_API_CHECK := $(LOCAL_PATH)/apicheck.mk | ||
21 | api_check_current_msg_file := $(LOCAL_PATH)/apicheck_msg_current.txt | ||
22 | api_check_last_msg_file := $(LOCAL_PATH)/apicheck_msg_last.txt | ||
23 | |||
24 | .PHONY: update-car-api | ||
25 | |||
26 | # Include the sub-makefiles | 18 | # Include the sub-makefiles |
27 | include $(call all-makefiles-under,$(LOCAL_PATH)) | 19 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
28 | |||
29 | # Clear out variables | ||
30 | CAR_API_CHECK := | ||
31 | api_check_current_msg_file := | ||
32 | api_check_last_msg_file := | ||
diff --git a/apicheck.mk b/apicheck.mk deleted file mode 100644 index b87c7d2e..00000000 --- a/apicheck.mk +++ /dev/null | |||
@@ -1,286 +0,0 @@ | |||
1 | # Copyright (C) 2016 The Android Open Source Project | ||
2 | # | ||
3 | # Licensed under the Apache License, Version 2.0 (the "License"); | ||
4 | # you may not use this file except in compliance with the License. | ||
5 | # You may obtain a copy of the License at | ||
6 | # | ||
7 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
8 | # | ||
9 | # Unless required by applicable law or agreed to in writing, software | ||
10 | # distributed under the License is distributed on an "AS IS" BASIS, | ||
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
12 | # See the License for the specific language governing permissions and | ||
13 | # limitations under the License. | ||
14 | |||
15 | # | ||
16 | # Input variables | ||
17 | # | ||
18 | # $(car_module) - name of the car library module | ||
19 | # $(car_module_api_dir) - dir to store API files | ||
20 | # $(car_module_include_systemapi) - if systemApi file should be generated | ||
21 | # $(car_module_proguard_file) - where to output the proguard file, if empty no file will be produced | ||
22 | # $(car_module_java_libraries) - dependent libraries | ||
23 | # $(car_module_java_packages) - list of package names containing public classes | ||
24 | # $(car_module_src_files) - list of source files | ||
25 | # $(api_check_current_msg_file) - file containing error message for current API check | ||
26 | # $(api_check_last_msg_file) - file containing error message for last SDK API check | ||
27 | # --------------------------------------------- | ||
28 | |||
29 | ifeq ($(BOARD_IS_AUTOMOTIVE), true) | ||
30 | ifneq ($(TARGET_BUILD_PDK), true) | ||
31 | # | ||
32 | # Generate the public stub source files | ||
33 | # --------------------------------------------- | ||
34 | include $(CLEAR_VARS) | ||
35 | |||
36 | car_module_api_file := \ | ||
37 | $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(car_module)_api.txt | ||
38 | car_module_removed_file := \ | ||
39 | $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(car_module)_removed.txt | ||
40 | |||
41 | LOCAL_MODULE := $(car_module)-stubs | ||
42 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES | ||
43 | LOCAL_MODULE_TAGS := optional | ||
44 | |||
45 | LOCAL_SRC_FILES := $(car_module_src_files) | ||
46 | LOCAL_JAVA_LIBRARIES := $(car_module_java_libraries) $(car_module) | ||
47 | LOCAL_ADDITIONAL_JAVA_DIR := \ | ||
48 | $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(car_module),,COMMON)/src | ||
49 | LOCAL_SDK_VERSION := $(CAR_CURRENT_SDK_VERSION) | ||
50 | |||
51 | LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/$(LOCAL_MODULE_CLASS)/$(LOCAL_MODULE)_intermediates/src | ||
52 | |||
53 | LOCAL_DROIDDOC_OPTIONS:= \ | ||
54 | -stubpackages "$(subst $(space),:,$(car_module_java_packages))" \ | ||
55 | -api $(car_module_api_file) \ | ||
56 | -removedApi $(car_module_removed_file) \ | ||
57 | -nodocs \ | ||
58 | -hide 113 \ | ||
59 | -hide 110 | ||
60 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := external/doclava/res/assets/templates-sdk | ||
61 | LOCAL_UNINSTALLABLE_MODULE := true | ||
62 | |||
63 | include $(BUILD_DROIDDOC) | ||
64 | car_stub_stamp := $(full_target) | ||
65 | $(car_module_api_file) : $(full_target) | ||
66 | |||
67 | ifeq ($(car_module_include_systemapi), true) | ||
68 | # | ||
69 | # Generate the system stub source files | ||
70 | # --------------------------------------------- | ||
71 | include $(CLEAR_VARS) | ||
72 | |||
73 | car_module_system_api_file := \ | ||
74 | $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(car_module)_system_api.txt | ||
75 | car_module_system_removed_file := \ | ||
76 | $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(car_module)_system_removed.txt | ||
77 | |||
78 | LOCAL_MODULE := $(car_module)-system-stubs | ||
79 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES | ||
80 | LOCAL_MODULE_TAGS := optional | ||
81 | |||
82 | LOCAL_SRC_FILES := $(car_module_src_files) | ||
83 | LOCAL_JAVA_LIBRARIES := $(car_module_java_libraries) $(car_module) | ||
84 | LOCAL_ADDITIONAL_JAVA_DIR := \ | ||
85 | $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(car_module),,COMMON)/src | ||
86 | LOCAL_SDK_VERSION := $(CAR_CURRENT_SDK_VERSION) | ||
87 | |||
88 | LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/$(LOCAL_MODULE_CLASS)/$(LOCAL_MODULE)_intermediates/src | ||
89 | |||
90 | LOCAL_DROIDDOC_OPTIONS:= \ | ||
91 | -stubpackages "$(subst $(space),:,$(car_module_java_packages))" \ | ||
92 | -showAnnotation android.annotation.SystemApi \ | ||
93 | -api $(car_module_system_api_file) \ | ||
94 | -removedApi $(car_module_system_removed_file) \ | ||
95 | -nodocs \ | ||
96 | -hide 113 \ | ||
97 | -hide 110 | ||
98 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := external/doclava/res/assets/templates-sdk | ||
99 | LOCAL_UNINSTALLABLE_MODULE := true | ||
100 | |||
101 | include $(BUILD_DROIDDOC) | ||
102 | car_system_stub_stamp := $(full_target) | ||
103 | $(car_module_system_api_file) : $(full_target) | ||
104 | |||
105 | #($(car_module_include_systemapi), true) | ||
106 | endif | ||
107 | |||
108 | |||
109 | ifneq ($(strip $(car_module_proguard_file)),) | ||
110 | # | ||
111 | # Generate a proguard files | ||
112 | # --------------------------------------------- | ||
113 | include $(CLEAR_VARS) | ||
114 | |||
115 | LOCAL_MODULE := $(car_module)-proguard | ||
116 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES | ||
117 | LOCAL_MODULE_TAGS := optional | ||
118 | |||
119 | LOCAL_SRC_FILES := $(car_module_src_files) | ||
120 | LOCAL_JAVA_LIBRARIES := $(car_module_java_libraries) $(car_module) | ||
121 | LOCAL_ADDITIONAL_JAVA_DIR := \ | ||
122 | $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(car_module),,COMMON)/src | ||
123 | LOCAL_SDK_VERSION := $(CAR_CURRENT_SDK_VERSION) | ||
124 | |||
125 | docs_proguard_intermediates_output := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE),,COMMON)/keep_list.proguard | ||
126 | LOCAL_DROIDDOC_OPTIONS := -proguard $(docs_proguard_intermediates_output) | ||
127 | |||
128 | include $(BUILD_DROIDDOC) | ||
129 | |||
130 | update-car-api: PRIVATE_PROGUARD_INTERMEDIATES_OUTPUT := $(docs_proguard_intermediates_output) | ||
131 | update-car-api: PRIVATE_PROGUARD_OUTPUT_FILE := $(car_module_proguard_file) | ||
132 | update-car-api: PRIVATE_CAR_MODULE := $(car_module) | ||
133 | update-car-api: $(car_module)-proguard-docs | $(ACP) | ||
134 | @echo $(PRIVATE_CAR_MODULE) copying $(PRIVATE_PROGUARD_INTERMEDIATES_OUTPUT) to $(PRIVATE_PROGUARD_OUTPUT_FILE) | ||
135 | $(hide) $(ACP) $(PRIVATE_PROGUARD_INTERMEDIATES_OUTPUT) $(PRIVATE_PROGUARD_OUTPUT_FILE) | ||
136 | |||
137 | # cleanup vars | ||
138 | docs_proguard_output := | ||
139 | # ($(strip $(car_module_proguard_file)),) | ||
140 | endif | ||
141 | |||
142 | |||
143 | # | ||
144 | # Check public API | ||
145 | # --------------------------------------------- | ||
146 | .PHONY: $(car_module)-check-public-api | ||
147 | checkapi: $(car_module)-check-public-api | ||
148 | $(car_module): $(car_module)-check-public-api | ||
149 | |||
150 | last_released_sdk_$(car_module) := $(lastword $(call numerically_sort, \ | ||
151 | $(filter-out current, \ | ||
152 | $(patsubst $(car_module_api_dir)/%.txt,%, $(wildcard $(car_module_api_dir)/*.txt)) \ | ||
153 | ))) | ||
154 | |||
155 | # Check that the API we're building hasn't broken the last-released SDK version | ||
156 | # if it exists | ||
157 | ifneq ($(last_released_sdk_$(car_module)),) | ||
158 | $(eval $(call check-api, \ | ||
159 | $(car_module)-checkapi-last, \ | ||
160 | $(car_module_api_dir)/$(last_released_sdk_$(car_module)).txt, \ | ||
161 | $(car_module_api_file), \ | ||
162 | $(car_module_api_dir)/removed.txt, \ | ||
163 | $(car_module_removed_file), \ | ||
164 | -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 \ | ||
165 | -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 \ | ||
166 | -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113, \ | ||
167 | cat $(api_check_last_msg_file), \ | ||
168 | $(car_module)-check-public-api, \ | ||
169 | $(car_stub_stamp))) | ||
170 | endif | ||
171 | |||
172 | # Check that the API we're building hasn't changed from the not-yet-released | ||
173 | # SDK version. | ||
174 | $(eval $(call check-api, \ | ||
175 | $(car_module)-checkapi-current, \ | ||
176 | $(car_module_api_dir)/current.txt, \ | ||
177 | $(car_module_api_file), \ | ||
178 | $(car_module_api_dir)/removed.txt, \ | ||
179 | $(car_module_removed_file), \ | ||
180 | -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 \ | ||
181 | -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 \ | ||
182 | -error 21 -error 23 -error 24 -error 25 -hide 113, \ | ||
183 | cat $(api_check_current_msg_file), \ | ||
184 | $(car_module)-check-public-api, \ | ||
185 | $(car_stub_stamp))) | ||
186 | |||
187 | .PHONY: update-$(car_module)-api | ||
188 | update-$(car_module)-api: PRIVATE_API_DIR := $(car_module_api_dir) | ||
189 | update-$(car_module)-api: PRIVATE_MODULE := $(car_module) | ||
190 | update-$(car_module)-api: PRIVATE_REMOVED_API_FILE := $(car_module_removed_file) | ||
191 | update-$(car_module)-api: PRIVATE_PROGUARD_FILE := $(car_module_proguard_file) | ||
192 | update-$(car_module)-api: $(car_module_api_file) | $(ACP) | ||
193 | @echo Copying $(PRIVATE_MODULE) current.txt | ||
194 | $(hide) $(ACP) $< $(PRIVATE_API_DIR)/current.txt | ||
195 | @echo Copying $(PRIVATE_MODULE) removed.txt | ||
196 | $(hide) $(ACP) $(PRIVATE_REMOVED_API_FILE) $(PRIVATE_API_DIR)/removed.txt | ||
197 | |||
198 | # Run this update API task on the update-car-api task | ||
199 | update-car-api: update-$(car_module)-api | ||
200 | |||
201 | ifeq ($(car_module_include_systemapi), true) | ||
202 | |||
203 | # | ||
204 | # Check system API | ||
205 | # --------------------------------------------- | ||
206 | .PHONY: $(car_module)-check-system-api | ||
207 | checkapi: $(car_module)-check-system-api | ||
208 | $(car_module): $(car_module)-check-system-api | ||
209 | |||
210 | last_released_system_sdk_$(car_module) := $(lastword $(call numerically_sort, \ | ||
211 | $(filter-out system-current, \ | ||
212 | $(patsubst $(car_module_api_dir)/%.txt,%, $(wildcard $(car_module_api_dir)/system-*.txt)) \ | ||
213 | ))) | ||
214 | |||
215 | # Check that the API we're building hasn't broken the last-released SDK version | ||
216 | # if it exists | ||
217 | ifneq ($(last_released_system_sdk_$(car_module)),) | ||
218 | $(eval $(call check-api, \ | ||
219 | $(car_module)-checksystemapi-last, \ | ||
220 | $(car_module_api_dir)/$(last_released_system_sdk_$(car_module)).txt, \ | ||
221 | $(car_module_system_api_file), \ | ||
222 | $(car_module_api_dir)/system-removed.txt, \ | ||
223 | $(car_module_system_removed_file), \ | ||
224 | -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 \ | ||
225 | -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 \ | ||
226 | -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113, \ | ||
227 | cat $(api_check_last_msg_file), \ | ||
228 | $(car_module)-check-system-api, \ | ||
229 | $(car_system_stub_stamp))) | ||
230 | endif | ||
231 | |||
232 | # Check that the API we're building hasn't changed from the not-yet-released | ||
233 | # SDK version. | ||
234 | $(eval $(call check-api, \ | ||
235 | $(car_module)-checksystemapi-current, \ | ||
236 | $(car_module_api_dir)/system-current.txt, \ | ||
237 | $(car_module_system_api_file), \ | ||
238 | $(car_module_api_dir)/system-removed.txt, \ | ||
239 | $(car_module_system_removed_file), \ | ||
240 | -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 \ | ||
241 | -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 \ | ||
242 | -error 21 -error 23 -error 24 -error 25 -hide 113, \ | ||
243 | cat $(api_check_current_msg_file), \ | ||
244 | $(car_module)-check-system-api, \ | ||
245 | $(car_stub_stamp))) | ||
246 | |||
247 | .PHONY: update-$(car_module)-system-api | ||
248 | update-$(car_module)-system-api: PRIVATE_API_DIR := $(car_module_api_dir) | ||
249 | update-$(car_module)-system-api: PRIVATE_MODULE := $(car_module) | ||
250 | update-$(car_module)-system-api: PRIVATE_REMOVED_API_FILE := $(car_module_system_removed_file) | ||
251 | update-$(car_module)-system-api: PRIVATE_PROGUARD_FILE := $(car_module_proguard_file) | ||
252 | update-$(car_module)-system-api: $(car_module_system_api_file) | $(ACP) | ||
253 | @echo Copying $(PRIVATE_MODULE) system-current.txt | ||
254 | $(hide) $(ACP) $< $(PRIVATE_API_DIR)/system-current.txt | ||
255 | @echo Copying $(PRIVATE_MODULE) system-removed.txt | ||
256 | $(hide) $(ACP) $(PRIVATE_REMOVED_API_FILE) $(PRIVATE_API_DIR)/system-removed.txt | ||
257 | |||
258 | # Run this update API task on the update-car-api task | ||
259 | update-car-api: update-$(car_module)-system-api | ||
260 | |||
261 | |||
262 | |||
263 | #($(car_module_include_systemapi), true) | ||
264 | endif | ||
265 | |||
266 | #($(TARGET_BUILD_PDK),true) | ||
267 | endif | ||
268 | |||
269 | #($(BOARD_IS_AUTOMOTIVE), true) | ||
270 | endif | ||
271 | # | ||
272 | # Clear variables | ||
273 | # --------------------------------------------- | ||
274 | car_module := | ||
275 | car_module_api_dir := | ||
276 | car_module_src_files := | ||
277 | car_module_java_libraries := | ||
278 | car_module_java_packages := | ||
279 | car_module_api_file := | ||
280 | car_module_removed_file := | ||
281 | car_module_system_api_file := | ||
282 | car_module_system_removed__file := | ||
283 | car_stub_stamp := | ||
284 | car_system_stub_stamp := | ||
285 | car_module_include_systemapi := | ||
286 | car_module_proguard_file := | ||
diff --git a/apicheck_msg_current.txt b/apicheck_msg_current.txt deleted file mode 100644 index fa3598fb..00000000 --- a/apicheck_msg_current.txt +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | |||
2 | ****************************** | ||
3 | You have tried to change a car library API from what has been previously approved. | ||
4 | |||
5 | To make these errors go away, you have two choices: | ||
6 | 1) You can add "@hide" javadoc comments to the methods, etc. listed in the | ||
7 | errors above. | ||
8 | |||
9 | 2) You can update current.txt by executing the following command: | ||
10 | make update-car-api | ||
11 | |||
12 | To submit the revised current.txt to the main Android repository, | ||
13 | you will need approval. | ||
14 | ****************************** | ||
diff --git a/apicheck_msg_last.txt b/apicheck_msg_last.txt deleted file mode 100644 index 5f548217..00000000 --- a/apicheck_msg_last.txt +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | |||
2 | ****************************** | ||
3 | You have tried to change a car library API from what has | ||
4 | been previously released in an SDK. Please fix the errors listed above. | ||
5 | ****************************** | ||
diff --git a/car-lib/Android.bp b/car-lib/Android.bp index 806121f3..6fe7f8be 100644 --- a/car-lib/Android.bp +++ b/car-lib/Android.bp | |||
@@ -70,3 +70,130 @@ java_library { | |||
70 | }, | 70 | }, |
71 | installable: true, | 71 | installable: true, |
72 | } | 72 | } |
73 | |||
74 | doc_defaults { | ||
75 | name: "android.car-docs-default", | ||
76 | srcs: [ | ||
77 | "src/**/*.java", | ||
78 | "src_feature_future/**/*.java", | ||
79 | ], | ||
80 | libs: [ | ||
81 | "android.car", | ||
82 | ], | ||
83 | custom_template: "droiddoc-templates-sdk", | ||
84 | product_variables: { | ||
85 | pdk: { | ||
86 | enabled: false, | ||
87 | }, | ||
88 | }, | ||
89 | } | ||
90 | |||
91 | genrule { | ||
92 | name: "android-car-last-released-api", | ||
93 | srcs: [ | ||
94 | "api/released/*.txt", | ||
95 | ], | ||
96 | cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-api.txt", | ||
97 | out: [ | ||
98 | "last-released-api.txt", | ||
99 | ], | ||
100 | } | ||
101 | |||
102 | genrule { | ||
103 | name: "android-car-last-released-system-api", | ||
104 | srcs: [ | ||
105 | "api/system-released/*.txt", | ||
106 | ], | ||
107 | cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-system-api.txt", | ||
108 | out: [ | ||
109 | "last-released-system-api.txt", | ||
110 | ], | ||
111 | } | ||
112 | |||
113 | droiddoc { | ||
114 | name: "android.car-stubs-docs", | ||
115 | defaults: ["android.car-docs-default"], | ||
116 | api_tag_name: "ANDROID_CAR", | ||
117 | api_filename: "api.txt", | ||
118 | removed_api_filename: "removed.txt", | ||
119 | args: "-hide 113 -hide 110 -nodocs -stubpackages android.car* ", | ||
120 | installable: false, | ||
121 | check_api: { | ||
122 | last_released: { | ||
123 | api_file: ":android-car-last-released-api", | ||
124 | removed_api_file: "api/removed.txt", | ||
125 | args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " + | ||
126 | " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " + | ||
127 | " -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ", | ||
128 | }, | ||
129 | current: { | ||
130 | api_file: "api/current.txt", | ||
131 | removed_api_file: "api/removed.txt", | ||
132 | args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " + | ||
133 | " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + | ||
134 | " -error 21 -error 23 -error 24 -error 25 -hide 113 ", | ||
135 | }, | ||
136 | }, | ||
137 | } | ||
138 | |||
139 | droiddoc { | ||
140 | name: "android.car-system-stubs-docs", | ||
141 | defaults: ["android.car-docs-default"], | ||
142 | api_tag_name: "ANDROID_CAR_SYSTEM", | ||
143 | api_filename: "api.txt", | ||
144 | removed_api_filename: "removed.txt", | ||
145 | args: "-hide 113 -hide 110 -nodocs -stubpackages android.car* " + | ||
146 | "-showAnnotation android.annotation.SystemApi ", | ||
147 | installable: false, | ||
148 | check_api: { | ||
149 | last_released: { | ||
150 | api_file: ":android-car-last-released-system-api", | ||
151 | removed_api_file: "api/system-removed.txt", | ||
152 | args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " + | ||
153 | " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " + | ||
154 | " -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ", | ||
155 | }, | ||
156 | current: { | ||
157 | api_file: "api/system-current.txt", | ||
158 | removed_api_file: "api/system-removed.txt", | ||
159 | args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " + | ||
160 | " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + | ||
161 | " -error 21 -error 23 -error 24 -error 25 -hide 113 ", | ||
162 | }, | ||
163 | }, | ||
164 | } | ||
165 | |||
166 | droiddoc { | ||
167 | name: "android.car-stub-docs", | ||
168 | srcs: [ | ||
169 | "src/**/*.java", | ||
170 | ], | ||
171 | libs: [ | ||
172 | "android.car", | ||
173 | ], | ||
174 | api_tag_name: "ANDROID_CAR_STUB", | ||
175 | api_filename: "api.txt", | ||
176 | custom_template: "droiddoc-templates-sdk", | ||
177 | args: "-nodocs -stubpackages android.car* ", | ||
178 | installable: false, | ||
179 | product_variables: { | ||
180 | pdk: { | ||
181 | enabled: false, | ||
182 | }, | ||
183 | }, | ||
184 | } | ||
185 | |||
186 | java_library_static { | ||
187 | name: "android.car-stubs", | ||
188 | srcs: [ | ||
189 | ":android.car-stub-docs", | ||
190 | ], | ||
191 | libs: [ | ||
192 | "android.car", | ||
193 | ], | ||
194 | product_variables: { | ||
195 | pdk: { | ||
196 | enabled: false, | ||
197 | }, | ||
198 | }, | ||
199 | } | ||
diff --git a/car-lib/Android.mk b/car-lib/Android.mk index e0fa4823..41c6d861 100644 --- a/car-lib/Android.mk +++ b/car-lib/Android.mk | |||
@@ -21,91 +21,9 @@ LOCAL_PATH:= $(call my-dir) | |||
21 | 21 | ||
22 | include $(CLEAR_VARS) | 22 | include $(CLEAR_VARS) |
23 | 23 | ||
24 | car_lib_sources := $(call all-java-files-under, src) | ||
25 | car_lib_sources += $(call all-java-files-under, src_feature_future) | ||
26 | |||
27 | car_lib_sources += $(call all-Iaidl-files-under, src) | ||
28 | |||
29 | # IoStats* are parcelable types (vs. interface types), but the build system uses an initial | ||
30 | # I as a magic marker to mean "interface", and due to this ends up refusing to compile | ||
31 | # these files as part of the build process. | ||
32 | # A clean solution to this is actively being worked on by the build team, but is not yet | ||
33 | # available, so for now we just filter the files out by hand. | ||
34 | car_lib_sources := $(filter-out src/android/car/storagemonitoring/IoStats.aidl,$(car_lib_sources)) | ||
35 | car_lib_sources := $(filter-out src/android/car/storagemonitoring/IoStatsEntry.aidl,$(car_lib_sources)) | ||
36 | |||
37 | ifeq ($(BOARD_IS_AUTOMOTIVE), true) | 24 | ifeq ($(BOARD_IS_AUTOMOTIVE), true) |
38 | full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.car,,COMMON)/classes.jar | 25 | full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.car,,COMMON)/classes.jar |
39 | $(call dist-for-goals,dist_files,$(full_classes_jar):android.car.jar) | 26 | $(call dist-for-goals,dist_files,$(full_classes_jar):android.car.jar) |
40 | endif | 27 | endif |
41 | 28 | ||
42 | # API Check | ||
43 | # --------------------------------------------- | ||
44 | car_module := android.car | ||
45 | car_module_src_files := $(car_lib_sources) | ||
46 | car_module_api_dir := $(LOCAL_PATH)/api | ||
47 | car_module_java_libraries := framework | ||
48 | car_module_include_systemapi := true | ||
49 | car_module_java_packages := android.car* | ||
50 | include $(CAR_API_CHECK) | ||
51 | |||
52 | # Build stubs jar for target android-support-car | ||
53 | # --------------------------------------------- | ||
54 | include $(CLEAR_VARS) | ||
55 | |||
56 | LOCAL_SRC_FILES := $(call all-java-files-under, src) | ||
57 | |||
58 | LOCAL_JAVA_LIBRARIES := android.car | ||
59 | |||
60 | LOCAL_ADDITIONAL_JAVA_DIR := $(call intermediates-dir-for,JAVA_LIBRARIES,android.car,,COMMON)/src | ||
61 | |||
62 | android_car_stub_packages := \ | ||
63 | android.car* | ||
64 | |||
65 | android_car_api := \ | ||
66 | $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/android.car_api.txt | ||
67 | |||
68 | # Note: The make target is android.car-stub-docs | ||
69 | LOCAL_MODULE := android.car-stub | ||
70 | LOCAL_DROIDDOC_OPTIONS := \ | ||
71 | -stubs $(call intermediates-dir-for,JAVA_LIBRARIES,android.car-stubs,,COMMON)/src \ | ||
72 | -stubpackages $(subst $(space),:,$(android_car_stub_packages)) \ | ||
73 | -api $(android_car_api) \ | ||
74 | -nodocs | ||
75 | |||
76 | LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/java/ | ||
77 | LOCAL_DROIDDOC_HTML_DIR := | ||
78 | |||
79 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES | ||
80 | |||
81 | LOCAL_UNINSTALLABLE_MODULE := true | ||
82 | |||
83 | include $(BUILD_DROIDDOC) | ||
84 | |||
85 | $(android_car_api): $(full_target) | ||
86 | |||
87 | android.car-stubs_stamp := $(full_target) | ||
88 | |||
89 | ############################################### | ||
90 | # Build the stubs java files into a jar. This build rule relies on the | ||
91 | # stubs_stamp make variable being set from the droiddoc rule. | ||
92 | |||
93 | include $(CLEAR_VARS) | ||
94 | |||
95 | # CAR_API_CHECK uses the same name to generate a module, but BUILD_DROIDDOC | ||
96 | # appends "-docs" to module name. | ||
97 | LOCAL_MODULE := android.car-stubs | ||
98 | LOCAL_SOURCE_FILES_ALL_GENERATED := true | ||
99 | |||
100 | # Make sure to run droiddoc first to generate the stub source files. | ||
101 | LOCAL_ADDITIONAL_DEPENDENCIES := $(android.car-stubs_stamp) | ||
102 | |||
103 | include $(BUILD_STATIC_JAVA_LIBRARY) | ||
104 | |||
105 | android.car-stubs_stamp := | ||
106 | android_car_stub_packages := | ||
107 | android_car_api := | ||
108 | |||
109 | include $(call all-makefiles-under,$(LOCAL_PATH)) | ||
110 | |||
111 | endif #TARGET_BUILD_PDK | 29 | endif #TARGET_BUILD_PDK |
diff --git a/car-lib/api/1.txt b/car-lib/api/released/1.txt index 556aaae3..556aaae3 100644 --- a/car-lib/api/1.txt +++ b/car-lib/api/released/1.txt | |||
diff --git a/car-lib/api/2.txt b/car-lib/api/released/2.txt index fb94b19e..fb94b19e 100644 --- a/car-lib/api/2.txt +++ b/car-lib/api/released/2.txt | |||
diff --git a/car-lib/api/system-1.txt b/car-lib/api/system-released/system-1.txt index e58b9be2..e58b9be2 100644 --- a/car-lib/api/system-1.txt +++ b/car-lib/api/system-released/system-1.txt | |||
diff --git a/car-lib/api/system-2.txt b/car-lib/api/system-released/system-2.txt index 3a2f2de2..3a2f2de2 100644 --- a/car-lib/api/system-2.txt +++ b/car-lib/api/system-released/system-2.txt | |||
diff --git a/car-support-lib/Android.bp b/car-support-lib/Android.bp new file mode 100644 index 00000000..2d4269e9 --- /dev/null +++ b/car-support-lib/Android.bp | |||
@@ -0,0 +1,103 @@ | |||
1 | // Copyright (C) 2018 The Android Open Source Project | ||
2 | // | ||
3 | // Licensed under the Apache License, Version 2.0 (the "License"); | ||
4 | // you may not use this file except in compliance with the License. | ||
5 | // You may obtain a copy of the License at | ||
6 | // | ||
7 | // http://www.apache.org/licenses/LICENSE-2.0 | ||
8 | // | ||
9 | // Unless required by applicable law or agreed to in writing, software | ||
10 | // distributed under the License is distributed on an "AS IS" BASIS, | ||
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
12 | // See the License for the specific language governing permissions and | ||
13 | // limitations under the License. | ||
14 | |||
15 | java_library_static { | ||
16 | name: "android.support.car", | ||
17 | srcs: [ | ||
18 | "src/**/*.java", | ||
19 | "src/**/I*.aidl", | ||
20 | ], | ||
21 | aidl: { | ||
22 | include_dirs: [ | ||
23 | "system/bt/binder", | ||
24 | ], | ||
25 | }, | ||
26 | libs: [ | ||
27 | "android.car", | ||
28 | ], | ||
29 | static_libs: [ | ||
30 | "androidx.annotation_annotation", | ||
31 | ], | ||
32 | platform_apis: true, | ||
33 | product_variables: { | ||
34 | pdk: { | ||
35 | enabled: false, | ||
36 | }, | ||
37 | }, | ||
38 | installable: true, | ||
39 | } | ||
40 | |||
41 | doc_defaults { | ||
42 | name: "android.support.car-docs-default", | ||
43 | srcs: [ | ||
44 | "src/**/*.java", | ||
45 | ], | ||
46 | libs: [ | ||
47 | "android.car", | ||
48 | "android.support.car", | ||
49 | "androidx.annotation_annotation", | ||
50 | ], | ||
51 | custom_template: "droiddoc-templates-sdk", | ||
52 | product_variables: { | ||
53 | pdk: { | ||
54 | enabled: false, | ||
55 | }, | ||
56 | }, | ||
57 | } | ||
58 | |||
59 | droiddoc { | ||
60 | name: "android.support.car-stubs-docs", | ||
61 | defaults: ["android.support.car-docs-default"], | ||
62 | api_tag_name: "ANDROID_SUPPORT_CAR", | ||
63 | api_filename: "api.txt", | ||
64 | removed_api_filename: "removed.txt", | ||
65 | args: "-hide 113 -hide 110 -nodocs -stubpackages android.support.car* ", | ||
66 | installable: false, | ||
67 | check_api: { | ||
68 | current: { | ||
69 | api_file: "api/current.txt", | ||
70 | removed_api_file: "api/removed.txt", | ||
71 | args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " + | ||
72 | " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + | ||
73 | " -error 21 -error 23 -error 24 -error 25 -hide 113 ", | ||
74 | }, | ||
75 | }, | ||
76 | } | ||
77 | |||
78 | droiddoc { | ||
79 | name: "android.support.car-proguard-docs", | ||
80 | defaults: ["android.support.car-docs-default"], | ||
81 | api_tag_name: "ANDROID_SUPPORT_CAR_PROGUARD", | ||
82 | proguard_filename: "keep_list.proguard", | ||
83 | create_stubs: false, | ||
84 | } | ||
85 | |||
86 | // TODO(deanh) support lib should be able to be using public APIs only | ||
87 | droiddoc { | ||
88 | name: "android.support.car-docs", | ||
89 | srcs: [ | ||
90 | "src/**/*.java", | ||
91 | ], | ||
92 | libs: [ | ||
93 | "android.car", | ||
94 | "androidx.annotation_annotation", | ||
95 | ], | ||
96 | custom_template: "droiddoc-templates-sdk", | ||
97 | create_stubs: false, | ||
98 | product_variables: { | ||
99 | pdk: { | ||
100 | enabled: false, | ||
101 | }, | ||
102 | }, | ||
103 | } | ||
diff --git a/car-support-lib/Android.mk b/car-support-lib/Android.mk index 6201f212..7cfba13e 100644 --- a/car-support-lib/Android.mk +++ b/car-support-lib/Android.mk | |||
@@ -76,59 +76,8 @@ ifeq ($(BOARD_IS_AUTOMOTIVE), true) | |||
76 | $(call dist-for-goals, dist_files, $(built_aar):android.support.car-1p.aar) | 76 | $(call dist-for-goals, dist_files, $(built_aar):android.support.car-1p.aar) |
77 | endif | 77 | endif |
78 | 78 | ||
79 | # Build support library. | 79 | update-support-car-proguard-api: $(INTERNAL_PLATFORM_ANDROID_SUPPORT_CAR_PROGUARD_PROGUARD_FILE) | $(ACP) |
80 | # --------------------------------------------- | 80 | @echo $(PRIVATE_CAR_MODULE) copying $(INTERNAL_PLATFORM_ANDROID_SUPPORT_CAR_PROGUARD_PROGUARD_FILE) to $(LOCAL_PATH)/proguard-release.flags |
81 | include $(CLEAR_VARS) | 81 | $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_SUPPORT_CAR_PROGUARD_PROGUARD_FILE) $(LOCAL_PATH)/proguard-release.flags |
82 | |||
83 | LOCAL_MODULE := android.support.car | ||
84 | |||
85 | #TODO(b/72620511) support lib should be able to be using public APIs only | ||
86 | #LOCAL_SDK_VERSION := current | ||
87 | LOCAL_PRIVATE_PLATFORM_APIS := true | ||
88 | |||
89 | LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src) | ||
90 | |||
91 | LOCAL_STATIC_JAVA_LIBRARIES += androidx.annotation_annotation | ||
92 | |||
93 | LOCAL_JAVA_LIBRARIES += android.car | ||
94 | |||
95 | include $(BUILD_STATIC_JAVA_LIBRARY) | ||
96 | |||
97 | # API Check | ||
98 | # --------------------------------------------- | ||
99 | car_module := $(LOCAL_MODULE) | ||
100 | car_module_src_files := $(LOCAL_SRC_FILES) | ||
101 | car_module_proguard_file := $(LOCAL_PATH)/proguard-release.flags | ||
102 | car_module_api_dir := $(LOCAL_PATH)/api | ||
103 | car_module_java_libraries := $(LOCAL_JAVA_LIBRARIES) $(LOCAL_STATIC_JAVA_LIBRARIES) framework | ||
104 | car_module_java_packages := android.support.car* | ||
105 | car_module_include_proguard := true | ||
106 | include $(CAR_API_CHECK) | ||
107 | |||
108 | |||
109 | # Generate offline docs | ||
110 | #--------------------------------------------- | ||
111 | include $(CLEAR_VARS) | ||
112 | |||
113 | LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src) | ||
114 | |||
115 | LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src | ||
116 | |||
117 | LOCAL_JAVA_LIBRARIES := \ | ||
118 | android.car \ | ||
119 | androidx.annotation_annotation | ||
120 | |||
121 | LOCAL_MODULE := android.support.car | ||
122 | LOCAL_MODULE_TAGS := optional | ||
123 | |||
124 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES | ||
125 | LOCAL_IS_HOST_MODULE := false | ||
126 | |||
127 | LOCAL_ADDITIONAL_JAVA_DIR := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),android.support.car,,COMMON) | ||
128 | |||
129 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := external/doclava/res/assets/templates-sdk | ||
130 | |||
131 | include $(BUILD_DROIDDOC) | ||
132 | |||
133 | 82 | ||
134 | endif #TARGET_BUILD_PDK | 83 | endif #TARGET_BUILD_PDK |