summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNan Zhang2018-08-22 23:05:29 -0500
committerandroid-build-merger2018-08-22 23:05:29 -0500
commitc264546c9b31b1360e7cf380ed30cbd789f40534 (patch)
treea7f17a0b10d4afd42ca1b3ec10f36cbb5f6f44d8
parentfd5ee634457a2f9440c70a98e914d3f3edf04cd7 (diff)
parent3a799f755a51d52a7f9d317b7fc446dcd0487788 (diff)
downloadplatform-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.mk13
-rw-r--r--apicheck.mk286
-rw-r--r--apicheck_msg_current.txt14
-rw-r--r--apicheck_msg_last.txt5
-rw-r--r--car-lib/Android.bp127
-rw-r--r--car-lib/Android.mk82
-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.bp103
-rw-r--r--car-support-lib/Android.mk57
12 files changed, 233 insertions, 454 deletions
diff --git a/Android.mk b/Android.mk
index 04f80048..8b1efbfb 100644
--- a/Android.mk
+++ b/Android.mk
@@ -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
17LOCAL_PATH := $(call my-dir) 15LOCAL_PATH := $(call my-dir)
18include $(CLEAR_VARS) 16include $(CLEAR_VARS)
19 17
20CAR_API_CHECK := $(LOCAL_PATH)/apicheck.mk
21api_check_current_msg_file := $(LOCAL_PATH)/apicheck_msg_current.txt
22api_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
27include $(call all-makefiles-under,$(LOCAL_PATH)) 19include $(call all-makefiles-under,$(LOCAL_PATH))
28
29# Clear out variables
30CAR_API_CHECK :=
31api_check_current_msg_file :=
32api_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
29ifeq ($(BOARD_IS_AUTOMOTIVE), true)
30ifneq ($(TARGET_BUILD_PDK), true)
31#
32# Generate the public stub source files
33# ---------------------------------------------
34include $(CLEAR_VARS)
35
36car_module_api_file := \
37 $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(car_module)_api.txt
38car_module_removed_file := \
39 $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(car_module)_removed.txt
40
41LOCAL_MODULE := $(car_module)-stubs
42LOCAL_MODULE_CLASS := JAVA_LIBRARIES
43LOCAL_MODULE_TAGS := optional
44
45LOCAL_SRC_FILES := $(car_module_src_files)
46LOCAL_JAVA_LIBRARIES := $(car_module_java_libraries) $(car_module)
47LOCAL_ADDITIONAL_JAVA_DIR := \
48 $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(car_module),,COMMON)/src
49LOCAL_SDK_VERSION := $(CAR_CURRENT_SDK_VERSION)
50
51LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/$(LOCAL_MODULE_CLASS)/$(LOCAL_MODULE)_intermediates/src
52
53LOCAL_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
60LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := external/doclava/res/assets/templates-sdk
61LOCAL_UNINSTALLABLE_MODULE := true
62
63include $(BUILD_DROIDDOC)
64car_stub_stamp := $(full_target)
65$(car_module_api_file) : $(full_target)
66
67ifeq ($(car_module_include_systemapi), true)
68#
69# Generate the system stub source files
70# ---------------------------------------------
71include $(CLEAR_VARS)
72
73car_module_system_api_file := \
74 $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(car_module)_system_api.txt
75car_module_system_removed_file := \
76 $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(car_module)_system_removed.txt
77
78LOCAL_MODULE := $(car_module)-system-stubs
79LOCAL_MODULE_CLASS := JAVA_LIBRARIES
80LOCAL_MODULE_TAGS := optional
81
82LOCAL_SRC_FILES := $(car_module_src_files)
83LOCAL_JAVA_LIBRARIES := $(car_module_java_libraries) $(car_module)
84LOCAL_ADDITIONAL_JAVA_DIR := \
85 $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(car_module),,COMMON)/src
86LOCAL_SDK_VERSION := $(CAR_CURRENT_SDK_VERSION)
87
88LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/$(LOCAL_MODULE_CLASS)/$(LOCAL_MODULE)_intermediates/src
89
90LOCAL_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
98LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := external/doclava/res/assets/templates-sdk
99LOCAL_UNINSTALLABLE_MODULE := true
100
101include $(BUILD_DROIDDOC)
102car_system_stub_stamp := $(full_target)
103$(car_module_system_api_file) : $(full_target)
104
105#($(car_module_include_systemapi), true)
106endif
107
108
109ifneq ($(strip $(car_module_proguard_file)),)
110#
111# Generate a proguard files
112# ---------------------------------------------
113include $(CLEAR_VARS)
114
115LOCAL_MODULE := $(car_module)-proguard
116LOCAL_MODULE_CLASS := JAVA_LIBRARIES
117LOCAL_MODULE_TAGS := optional
118
119LOCAL_SRC_FILES := $(car_module_src_files)
120LOCAL_JAVA_LIBRARIES := $(car_module_java_libraries) $(car_module)
121LOCAL_ADDITIONAL_JAVA_DIR := \
122 $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(car_module),,COMMON)/src
123LOCAL_SDK_VERSION := $(CAR_CURRENT_SDK_VERSION)
124
125docs_proguard_intermediates_output := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE),,COMMON)/keep_list.proguard
126LOCAL_DROIDDOC_OPTIONS := -proguard $(docs_proguard_intermediates_output)
127
128include $(BUILD_DROIDDOC)
129
130update-car-api: PRIVATE_PROGUARD_INTERMEDIATES_OUTPUT := $(docs_proguard_intermediates_output)
131update-car-api: PRIVATE_PROGUARD_OUTPUT_FILE := $(car_module_proguard_file)
132update-car-api: PRIVATE_CAR_MODULE := $(car_module)
133update-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
138docs_proguard_output :=
139# ($(strip $(car_module_proguard_file)),)
140endif
141
142
143#
144# Check public API
145# ---------------------------------------------
146.PHONY: $(car_module)-check-public-api
147checkapi: $(car_module)-check-public-api
148$(car_module): $(car_module)-check-public-api
149
150last_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
157ifneq ($(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)))
170endif
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
188update-$(car_module)-api: PRIVATE_API_DIR := $(car_module_api_dir)
189update-$(car_module)-api: PRIVATE_MODULE := $(car_module)
190update-$(car_module)-api: PRIVATE_REMOVED_API_FILE := $(car_module_removed_file)
191update-$(car_module)-api: PRIVATE_PROGUARD_FILE := $(car_module_proguard_file)
192update-$(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
199update-car-api: update-$(car_module)-api
200
201ifeq ($(car_module_include_systemapi), true)
202
203#
204# Check system API
205# ---------------------------------------------
206.PHONY: $(car_module)-check-system-api
207checkapi: $(car_module)-check-system-api
208$(car_module): $(car_module)-check-system-api
209
210last_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
217ifneq ($(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)))
230endif
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
248update-$(car_module)-system-api: PRIVATE_API_DIR := $(car_module_api_dir)
249update-$(car_module)-system-api: PRIVATE_MODULE := $(car_module)
250update-$(car_module)-system-api: PRIVATE_REMOVED_API_FILE := $(car_module_system_removed_file)
251update-$(car_module)-system-api: PRIVATE_PROGUARD_FILE := $(car_module_proguard_file)
252update-$(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
259update-car-api: update-$(car_module)-system-api
260
261
262
263#($(car_module_include_systemapi), true)
264endif
265
266#($(TARGET_BUILD_PDK),true)
267endif
268
269#($(BOARD_IS_AUTOMOTIVE), true)
270endif
271#
272# Clear variables
273# ---------------------------------------------
274car_module :=
275car_module_api_dir :=
276car_module_src_files :=
277car_module_java_libraries :=
278car_module_java_packages :=
279car_module_api_file :=
280car_module_removed_file :=
281car_module_system_api_file :=
282car_module_system_removed__file :=
283car_stub_stamp :=
284car_system_stub_stamp :=
285car_module_include_systemapi :=
286car_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******************************
3You have tried to change a car library API from what has been previously approved.
4
5To 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******************************
3You have tried to change a car library API from what has
4been 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
74doc_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
91genrule {
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
102genrule {
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
113droiddoc {
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
139droiddoc {
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
166droiddoc {
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
186java_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
22include $(CLEAR_VARS) 22include $(CLEAR_VARS)
23 23
24car_lib_sources := $(call all-java-files-under, src)
25car_lib_sources += $(call all-java-files-under, src_feature_future)
26
27car_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.
34car_lib_sources := $(filter-out src/android/car/storagemonitoring/IoStats.aidl,$(car_lib_sources))
35car_lib_sources := $(filter-out src/android/car/storagemonitoring/IoStatsEntry.aidl,$(car_lib_sources))
36
37ifeq ($(BOARD_IS_AUTOMOTIVE), true) 24ifeq ($(BOARD_IS_AUTOMOTIVE), true)
38full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.car,,COMMON)/classes.jar 25full_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)
40endif 27endif
41 28
42# API Check
43# ---------------------------------------------
44car_module := android.car
45car_module_src_files := $(car_lib_sources)
46car_module_api_dir := $(LOCAL_PATH)/api
47car_module_java_libraries := framework
48car_module_include_systemapi := true
49car_module_java_packages := android.car*
50include $(CAR_API_CHECK)
51
52# Build stubs jar for target android-support-car
53# ---------------------------------------------
54include $(CLEAR_VARS)
55
56LOCAL_SRC_FILES := $(call all-java-files-under, src)
57
58LOCAL_JAVA_LIBRARIES := android.car
59
60LOCAL_ADDITIONAL_JAVA_DIR := $(call intermediates-dir-for,JAVA_LIBRARIES,android.car,,COMMON)/src
61
62android_car_stub_packages := \
63 android.car*
64
65android_car_api := \
66 $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/android.car_api.txt
67
68# Note: The make target is android.car-stub-docs
69LOCAL_MODULE := android.car-stub
70LOCAL_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
76LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/java/
77LOCAL_DROIDDOC_HTML_DIR :=
78
79LOCAL_MODULE_CLASS := JAVA_LIBRARIES
80
81LOCAL_UNINSTALLABLE_MODULE := true
82
83include $(BUILD_DROIDDOC)
84
85$(android_car_api): $(full_target)
86
87android.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
93include $(CLEAR_VARS)
94
95# CAR_API_CHECK uses the same name to generate a module, but BUILD_DROIDDOC
96# appends "-docs" to module name.
97LOCAL_MODULE := android.car-stubs
98LOCAL_SOURCE_FILES_ALL_GENERATED := true
99
100# Make sure to run droiddoc first to generate the stub source files.
101LOCAL_ADDITIONAL_DEPENDENCIES := $(android.car-stubs_stamp)
102
103include $(BUILD_STATIC_JAVA_LIBRARY)
104
105android.car-stubs_stamp :=
106android_car_stub_packages :=
107android_car_api :=
108
109include $(call all-makefiles-under,$(LOCAL_PATH))
110
111endif #TARGET_BUILD_PDK 29endif #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
15java_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
41doc_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
59droiddoc {
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
78droiddoc {
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
87droiddoc {
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)
77endif 77endif
78 78
79# Build support library. 79update-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
81include $(CLEAR_VARS) 81 $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_SUPPORT_CAR_PROGUARD_PROGUARD_FILE) $(LOCAL_PATH)/proguard-release.flags
82
83LOCAL_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
87LOCAL_PRIVATE_PLATFORM_APIS := true
88
89LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src)
90
91LOCAL_STATIC_JAVA_LIBRARIES += androidx.annotation_annotation
92
93LOCAL_JAVA_LIBRARIES += android.car
94
95include $(BUILD_STATIC_JAVA_LIBRARY)
96
97# API Check
98# ---------------------------------------------
99car_module := $(LOCAL_MODULE)
100car_module_src_files := $(LOCAL_SRC_FILES)
101car_module_proguard_file := $(LOCAL_PATH)/proguard-release.flags
102car_module_api_dir := $(LOCAL_PATH)/api
103car_module_java_libraries := $(LOCAL_JAVA_LIBRARIES) $(LOCAL_STATIC_JAVA_LIBRARIES) framework
104car_module_java_packages := android.support.car*
105car_module_include_proguard := true
106include $(CAR_API_CHECK)
107
108
109# Generate offline docs
110#---------------------------------------------
111include $(CLEAR_VARS)
112
113LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src)
114
115LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src
116
117LOCAL_JAVA_LIBRARIES := \
118 android.car \
119 androidx.annotation_annotation
120
121LOCAL_MODULE := android.support.car
122LOCAL_MODULE_TAGS := optional
123
124LOCAL_MODULE_CLASS := JAVA_LIBRARIES
125LOCAL_IS_HOST_MODULE := false
126
127LOCAL_ADDITIONAL_JAVA_DIR := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),android.support.car,,COMMON)
128
129LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := external/doclava/res/assets/templates-sdk
130
131include $(BUILD_DROIDDOC)
132
133 82
134endif #TARGET_BUILD_PDK 83endif #TARGET_BUILD_PDK