Android.mk revision 4491d684f47fcf1e05652f910587a930be8a4135
1#
2# Copyright (C) 2008 The Android Open Source Project
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#
16LOCAL_PATH := $(call my-dir)
17
18# We have a special case here where we build the library's resources
19# independently from its code, so we need to find where the resource
20# class source got placed in the course of building the resources.
21# Thus, the magic here.
22# Also, this module cannot depend directly on the R.java file; if it
23# did, the PRIVATE_* vars for R.java wouldn't be guaranteed to be correct.
24# Instead, it depends on the R.stamp file, which lists the corresponding
25# R.java file as a prerequisite.
26# TODO: find a more appropriate way to do this.
27framework_res_source_path := APPS/framework-res_intermediates/src
28
29# the library
30# ============================================================
31include $(CLEAR_VARS)
32
33# FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
34LOCAL_SRC_FILES := $(call find-other-java-files,$(FRAMEWORKS_BASE_SUBDIRS))
35
36# EventLogTags files.
37LOCAL_SRC_FILES += \
38       core/java/android/content/EventLogTags.logtags \
39       core/java/android/speech/tts/EventLogTags.logtags \
40       core/java/android/webkit/EventLogTags.logtags \
41
42# The following filters out code we are temporarily not including at all.
43# TODO: Move AWT and beans (and associated harmony code) back into libcore.
44# TODO: Maybe remove javax.microedition entirely?
45# TODO: Move SyncML (org.mobilecontrol.*) into its own library.
46LOCAL_SRC_FILES := $(filter-out \
47			org/mobilecontrol/% \
48			,$(LOCAL_SRC_FILES))
49
50## READ ME: ########################################################
51##
52## When updating this list of aidl files, consider if that aidl is
53## part of the SDK API.  If it is, also add it to the list below that
54## is preprocessed and distributed with the SDK.  This list should
55## not contain any aidl files for parcelables, but the one below should
56## if you intend for 3rd parties to be able to send those objects
57## across process boundaries.
58##
59## READ ME: ########################################################
60LOCAL_SRC_FILES += \
61	core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl \
62	core/java/android/accessibilityservice/IAccessibilityServiceClient.aidl \
63	core/java/android/accounts/IAccountManager.aidl \
64	core/java/android/accounts/IAccountManagerResponse.aidl \
65	core/java/android/accounts/IAccountAuthenticator.aidl \
66	core/java/android/accounts/IAccountAuthenticatorResponse.aidl \
67	core/java/android/app/IActivityController.aidl \
68	core/java/android/app/IActivityPendingResult.aidl \
69	core/java/android/app/IAlarmManager.aidl \
70	core/java/android/app/IBackupAgent.aidl \
71	core/java/android/app/IInstrumentationWatcher.aidl \
72	core/java/android/app/INotificationManager.aidl \
73	core/java/android/app/IProcessObserver.aidl \
74	core/java/android/app/ISearchManager.aidl \
75	core/java/android/app/ISearchManagerCallback.aidl \
76	core/java/android/app/IServiceConnection.aidl \
77	core/java/android/app/IStopUserCallback.aidl \
78	core/java/android/app/IThumbnailReceiver.aidl \
79	core/java/android/app/IThumbnailRetriever.aidl \
80	core/java/android/app/ITransientNotification.aidl \
81	core/java/android/app/IUiAutomationConnection.aidl \
82	core/java/android/app/IUiModeManager.aidl \
83	core/java/android/app/IUserSwitchObserver.aidl \
84	core/java/android/app/IWallpaperManager.aidl \
85	core/java/android/app/IWallpaperManagerCallback.aidl \
86	core/java/android/app/admin/IDevicePolicyManager.aidl \
87	core/java/android/app/backup/IBackupManager.aidl \
88	core/java/android/app/backup/IFullBackupRestoreObserver.aidl \
89	core/java/android/app/backup/IRestoreObserver.aidl \
90	core/java/android/app/backup/IRestoreSession.aidl \
91	core/java/android/bluetooth/IBluetooth.aidl \
92	core/java/android/bluetooth/IBluetoothA2dp.aidl \
93	core/java/android/bluetooth/IBluetoothCallback.aidl \
94	core/java/android/bluetooth/IBluetoothHeadset.aidl \
95	core/java/android/bluetooth/IBluetoothHeadsetPhone.aidl \
96	core/java/android/bluetooth/IBluetoothHealth.aidl \
97	core/java/android/bluetooth/IBluetoothHealthCallback.aidl \
98	core/java/android/bluetooth/IBluetoothInputDevice.aidl \
99	core/java/android/bluetooth/IBluetoothPan.aidl \
100	core/java/android/bluetooth/IBluetoothManager.aidl \
101	core/java/android/bluetooth/IBluetoothManagerCallback.aidl \
102	core/java/android/bluetooth/IBluetoothPbap.aidl \
103	core/java/android/bluetooth/IBluetoothStateChangeCallback.aidl \
104	core/java/android/bluetooth/IBluetoothGatt.aidl \
105	core/java/android/bluetooth/IBluetoothGattCallback.aidl \
106	core/java/android/bluetooth/IBluetoothGattServerCallback.aidl \
107	core/java/android/content/IClipboard.aidl \
108	core/java/android/content/IContentService.aidl \
109	core/java/android/content/IIntentReceiver.aidl \
110	core/java/android/content/IIntentSender.aidl \
111	core/java/android/content/IOnPrimaryClipChangedListener.aidl \
112	core/java/android/content/ISyncAdapter.aidl \
113	core/java/android/content/ISyncContext.aidl \
114	core/java/android/content/ISyncStatusObserver.aidl \
115	core/java/android/content/pm/IPackageDataObserver.aidl \
116	core/java/android/content/pm/IPackageDeleteObserver.aidl \
117	core/java/android/content/pm/IPackageInstallObserver.aidl \
118	core/java/android/content/pm/IPackageManager.aidl \
119	core/java/android/content/pm/IPackageMoveObserver.aidl \
120	core/java/android/content/pm/IPackageStatsObserver.aidl \
121	core/java/android/database/IContentObserver.aidl \
122	core/java/android/hardware/ICameraService.aidl \
123	core/java/android/hardware/ICameraServiceListener.aidl \
124	core/java/android/hardware/ICamera.aidl \
125	core/java/android/hardware/ICameraClient.aidl \
126	core/java/android/hardware/IProCameraUser.aidl \
127	core/java/android/hardware/IProCameraCallbacks.aidl \
128	core/java/android/hardware/ISerialManager.aidl \
129	core/java/android/hardware/display/IDisplayManager.aidl \
130	core/java/android/hardware/display/IDisplayManagerCallback.aidl \
131	core/java/android/hardware/input/IInputManager.aidl \
132	core/java/android/hardware/input/IInputDevicesChangedListener.aidl \
133	core/java/android/hardware/location/IGeofenceHardware.aidl \
134	core/java/android/hardware/location/IGeofenceHardwareCallback.aidl \
135	core/java/android/hardware/location/IGeofenceHardwareMonitorCallback.aidl \
136	core/java/android/hardware/usb/IUsbManager.aidl \
137	core/java/android/net/IConnectivityManager.aidl \
138	core/java/android/net/INetworkManagementEventObserver.aidl \
139	core/java/android/net/INetworkPolicyListener.aidl \
140	core/java/android/net/INetworkPolicyManager.aidl \
141	core/java/android/net/INetworkStatsService.aidl \
142	core/java/android/net/INetworkStatsSession.aidl \
143	core/java/android/net/nsd/INsdManager.aidl \
144	core/java/android/nfc/INdefPushCallback.aidl \
145	core/java/android/nfc/INfcAdapter.aidl \
146	core/java/android/nfc/INfcAdapterExtras.aidl \
147	core/java/android/nfc/INfcTag.aidl \
148	core/java/android/os/ICancellationSignal.aidl \
149	core/java/android/os/IHardwareService.aidl \
150	core/java/android/os/IMessenger.aidl \
151	core/java/android/os/INetworkManagementService.aidl \
152	core/java/android/os/IPermissionController.aidl \
153	core/java/android/os/IPowerManager.aidl \
154	core/java/android/os/IRemoteCallback.aidl \
155	core/java/android/os/ISchedulingPolicyService.aidl \
156	core/java/android/os/IUpdateLock.aidl \
157	core/java/android/os/IUserManager.aidl \
158	core/java/android/os/IVibratorService.aidl \
159	core/java/android/service/notification/INotificationListener.aidl \
160	core/java/android/service/dreams/IDreamManager.aidl \
161	core/java/android/service/dreams/IDreamService.aidl \
162	core/java/android/service/wallpaper/IWallpaperConnection.aidl \
163	core/java/android/service/wallpaper/IWallpaperEngine.aidl \
164	core/java/android/service/wallpaper/IWallpaperService.aidl \
165	core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl\
166	core/java/android/view/accessibility/IAccessibilityInteractionConnectionCallback.aidl\
167	core/java/android/view/accessibility/IAccessibilityManager.aidl \
168	core/java/android/view/accessibility/IAccessibilityManagerClient.aidl \
169	core/java/android/view/IApplicationToken.aidl \
170	core/java/android/view/IAssetAtlas.aidl \
171	core/java/android/view/IMagnificationCallbacks.aidl \
172	core/java/android/view/IInputFilter.aidl \
173	core/java/android/view/IInputFilterHost.aidl \
174	core/java/android/view/IOnKeyguardExitResult.aidl \
175	core/java/android/view/IRotationWatcher.aidl \
176	core/java/android/view/IWindow.aidl \
177	core/java/android/view/IWindowFocusObserver.aidl \
178	core/java/android/view/IWindowId.aidl \
179	core/java/android/view/IWindowManager.aidl \
180	core/java/android/view/IWindowSession.aidl \
181	core/java/android/speech/IRecognitionListener.aidl \
182	core/java/android/speech/IRecognitionService.aidl \
183	core/java/android/speech/tts/ITextToSpeechCallback.aidl \
184	core/java/android/speech/tts/ITextToSpeechService.aidl \
185	core/java/com/android/internal/app/IAppOpsCallback.aidl \
186	core/java/com/android/internal/app/IAppOpsService.aidl \
187	core/java/com/android/internal/app/IBatteryStats.aidl \
188	core/java/com/android/internal/app/IUsageStats.aidl \
189	core/java/com/android/internal/app/IMediaContainerService.aidl \
190	core/java/com/android/internal/appwidget/IAppWidgetService.aidl \
191	core/java/com/android/internal/appwidget/IAppWidgetHost.aidl \
192	core/java/com/android/internal/backup/IBackupTransport.aidl \
193	core/java/com/android/internal/backup/IObbBackupService.aidl \
194	core/java/com/android/internal/policy/IFaceLockCallback.aidl \
195	core/java/com/android/internal/policy/IFaceLockInterface.aidl \
196	core/java/com/android/internal/policy/IKeyguardShowCallback.aidl \
197	core/java/com/android/internal/policy/IKeyguardExitCallback.aidl \
198	core/java/com/android/internal/policy/IKeyguardService.aidl \
199	core/java/com/android/internal/os/IDropBoxManagerService.aidl \
200	core/java/com/android/internal/os/IResultReceiver.aidl \
201	core/java/com/android/internal/statusbar/IStatusBar.aidl \
202	core/java/com/android/internal/statusbar/IStatusBarService.aidl \
203	core/java/com/android/internal/textservice/ISpellCheckerService.aidl \
204	core/java/com/android/internal/textservice/ISpellCheckerSession.aidl \
205	core/java/com/android/internal/textservice/ISpellCheckerSessionListener.aidl \
206	core/java/com/android/internal/textservice/ITextServicesManager.aidl \
207	core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl \
208	core/java/com/android/internal/view/IInputContext.aidl \
209	core/java/com/android/internal/view/IInputContextCallback.aidl \
210	core/java/com/android/internal/view/IInputMethod.aidl \
211	core/java/com/android/internal/view/IInputMethodClient.aidl \
212	core/java/com/android/internal/view/IInputMethodManager.aidl \
213	core/java/com/android/internal/view/IInputMethodSession.aidl \
214	core/java/com/android/internal/view/IInputSessionCallback.aidl \
215	core/java/com/android/internal/widget/ILockSettings.aidl \
216	core/java/com/android/internal/widget/IRemoteViewsFactory.aidl \
217	core/java/com/android/internal/widget/IRemoteViewsAdapterConnection.aidl \
218	keystore/java/android/security/IKeyChainAliasCallback.aidl \
219	keystore/java/android/security/IKeyChainService.aidl \
220	location/java/android/location/ICountryDetector.aidl \
221	location/java/android/location/ICountryListener.aidl \
222	location/java/android/location/IGeocodeProvider.aidl \
223	location/java/android/location/IGeofenceProvider.aidl \
224	location/java/android/location/IGpsStatusListener.aidl \
225	location/java/android/location/IGpsStatusProvider.aidl \
226	location/java/android/location/ILocationListener.aidl \
227	location/java/android/location/ILocationManager.aidl \
228	location/java/android/location/IGpsGeofenceHardware.aidl \
229	location/java/android/location/INetInitiatedListener.aidl \
230	location/java/com/android/internal/location/ILocationProvider.aidl \
231	media/java/android/media/IAudioService.aidl \
232	media/java/android/media/IAudioFocusDispatcher.aidl \
233	media/java/android/media/IAudioRoutesObserver.aidl \
234	media/java/android/media/IMediaScannerListener.aidl \
235	media/java/android/media/IMediaScannerService.aidl \
236	media/java/android/media/IRemoteControlClient.aidl \
237	media/java/android/media/IRemoteControlDisplay.aidl \
238	media/java/android/media/IRemoteVolumeObserver.aidl \
239	media/java/android/media/IRingtonePlayer.aidl \
240	telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl \
241	telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \
242	telephony/java/com/android/internal/telephony/ITelephony.aidl \
243	telephony/java/com/android/internal/telephony/ISms.aidl \
244	telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl \
245	telephony/java/com/android/internal/telephony/IWapPushManager.aidl \
246	wifi/java/android/net/wifi/IWifiManager.aidl \
247	wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl
248#
249
250
251# FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/pathmap.mk
252LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
253
254LOCAL_INTERMEDIATE_SOURCES := \
255			$(framework_res_source_path)/android/R.java \
256			$(framework_res_source_path)/android/Manifest.java \
257			$(framework_res_source_path)/com/android/internal/R.java
258
259LOCAL_NO_STANDARD_LIBRARIES := true
260LOCAL_JAVA_LIBRARIES := bouncycastle conscrypt core core-junit ext okhttp
261
262LOCAL_MODULE := framework
263LOCAL_MODULE_CLASS := JAVA_LIBRARIES
264
265# List of classes and interfaces which should be loaded by the Zygote.
266LOCAL_JAVA_RESOURCE_FILES += $(LOCAL_PATH)/preloaded-classes
267
268#LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
269
270LOCAL_DX_FLAGS := --core-library
271
272include $(BUILD_JAVA_LIBRARY)
273
274# Make sure that R.java and Manifest.java are built before we build
275# the source for this library.
276framework_res_R_stamp := \
277	$(call intermediates-dir-for,APPS,framework-res,,COMMON)/src/R.stamp
278$(full_classes_compiled_jar): $(framework_res_R_stamp)
279
280# Make sure that framework-res is installed when framework is.
281$(LOCAL_INSTALLED_MODULE): | $(dir $(LOCAL_INSTALLED_MODULE))framework-res.apk
282
283framework_built := $(call java-lib-deps,framework)
284
285# AIDL files to be preprocessed and included in the SDK,
286# relative to the root of the build tree.
287# ============================================================
288aidl_files := \
289	frameworks/base/core/java/android/accounts/IAccountManager.aidl \
290	frameworks/base/core/java/android/accounts/IAccountManagerResponse.aidl \
291	frameworks/base/core/java/android/accounts/IAccountAuthenticator.aidl \
292	frameworks/base/core/java/android/accounts/IAccountAuthenticatorResponse.aidl \
293	frameworks/base/core/java/android/app/Notification.aidl \
294	frameworks/base/core/java/android/app/PendingIntent.aidl \
295	frameworks/base/core/java/android/appwidget/AppWidgetProviderInfo.aidl \
296	frameworks/base/core/java/android/bluetooth/BluetoothDevice.aidl \
297	frameworks/base/core/java/android/bluetooth/BluetoothHealthAppConfiguration.aidl \
298	frameworks/base/core/java/android/content/ComponentName.aidl \
299	frameworks/base/core/java/android/content/ContentValues.aidl \
300	frameworks/base/core/java/android/content/Intent.aidl \
301	frameworks/base/core/java/android/content/IntentSender.aidl \
302	frameworks/base/core/java/android/content/PeriodicSync.aidl \
303	frameworks/base/core/java/android/content/SyncStats.aidl \
304	frameworks/base/core/java/android/content/res/Configuration.aidl \
305	frameworks/base/core/java/android/database/CursorWindow.aidl \
306	frameworks/base/core/java/android/net/Uri.aidl \
307	frameworks/base/core/java/android/nfc/NdefMessage.aidl \
308	frameworks/base/core/java/android/nfc/NdefRecord.aidl \
309	frameworks/base/core/java/android/nfc/Tag.aidl \
310	frameworks/base/core/java/android/os/Bundle.aidl \
311	frameworks/base/core/java/android/os/DropBoxManager.aidl \
312	frameworks/base/core/java/android/os/ParcelFileDescriptor.aidl \
313	frameworks/base/core/java/android/os/ParcelUuid.aidl \
314	frameworks/base/core/java/android/view/KeyEvent.aidl \
315	frameworks/base/core/java/android/view/MotionEvent.aidl \
316	frameworks/base/core/java/android/view/Surface.aidl \
317	frameworks/base/core/java/android/view/WindowManager.aidl \
318	frameworks/base/core/java/android/widget/RemoteViews.aidl \
319	frameworks/base/core/java/com/android/internal/textservice/ISpellCheckerService.aidl \
320	frameworks/base/core/java/com/android/internal/textservice/ISpellCheckerSession.aidl \
321	frameworks/base/core/java/com/android/internal/textservice/ISpellCheckerSessionListener.aidl \
322	frameworks/base/core/java/com/android/internal/textservice/ITextServicesManager.aidl \
323	frameworks/base/core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl \
324	frameworks/base/core/java/com/android/internal/view/IInputContext.aidl \
325	frameworks/base/core/java/com/android/internal/view/IInputMethod.aidl \
326	frameworks/base/core/java/com/android/internal/view/IInputMethodClient.aidl \
327	frameworks/base/core/java/com/android/internal/view/IInputMethodManager.aidl \
328	frameworks/base/core/java/com/android/internal/view/IInputMethodSession.aidl \
329	frameworks/base/graphics/java/android/graphics/Bitmap.aidl \
330	frameworks/base/graphics/java/android/graphics/Rect.aidl \
331	frameworks/base/graphics/java/android/graphics/Region.aidl \
332	frameworks/base/location/java/android/location/Criteria.aidl \
333	frameworks/base/location/java/android/location/Geofence.aidl \
334	frameworks/base/location/java/android/location/Location.aidl \
335	frameworks/base/location/java/android/location/LocationRequest.aidl \
336	frameworks/base/location/java/com/android/internal/location/ProviderProperties.aidl \
337	frameworks/base/location/java/com/android/internal/location/ProviderRequest.aidl \
338	frameworks/base/telephony/java/android/telephony/ServiceState.aidl \
339	frameworks/base/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \
340	frameworks/base/telephony/java/com/android/internal/telephony/ITelephony.aidl \
341
342gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
343$(gen): PRIVATE_SRC_FILES := $(aidl_files)
344ALL_SDK_FILES += $(gen)
345$(gen): $(aidl_files) | $(AIDL)
346		@echo Aidl Preprocess: $@
347		$(hide) $(AIDL) --preprocess $@ $(PRIVATE_SRC_FILES)
348
349# the documentation
350# ============================================================
351
352# TODO: deal with com/google/android/googleapps
353packages_to_document := \
354	android \
355	javax/microedition/khronos
356
357# Search through the base framework dirs for these packages.
358# The result will be relative to frameworks/base.
359fwbase_dirs_to_document := \
360	test-runner/src \
361	$(patsubst $(LOCAL_PATH)/%,%, \
362	  $(wildcard \
363	    $(foreach dir, $(FRAMEWORKS_BASE_JAVA_SRC_DIRS), \
364	      $(addprefix $(dir)/, $(packages_to_document)) \
365	     ) \
366	   ) \
367	 )
368
369# include definition of libcore_to_document
370include libcore/Docs.mk
371
372# include definition of junit_to_document
373include external/junit/Common.mk
374
375non_base_dirs := \
376	../../external/apache-http/src/org/apache/http \
377	../opt/telephony/src/java/android/telephony \
378	../opt/telephony/src/java/android/telephony/gsm \
379	../opt/net/voip/src/java/android/net/rtp \
380	../opt/net/voip/src/java/android/net/sip
381
382# These are relative to frameworks/base
383dirs_to_check_apis := \
384  $(fwbase_dirs_to_document) \
385	$(non_base_dirs)
386
387# These are relative to frameworks/base
388# FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
389dirs_to_document := \
390	$(dirs_to_check_apis) \
391  $(addprefix ../../, $(FRAMEWORKS_SUPPORT_JAVA_SRC_DIRS))
392
393# These are relative to frameworks/base
394html_dirs := \
395	$(FRAMEWORKS_BASE_SUBDIRS) \
396	$(non_base_dirs)
397
398# Common sources for doc check and api check
399common_src_files := \
400	$(call find-other-html-files, $(html_dirs)) \
401	$(addprefix ../../libcore/, $(call libcore_to_document, $(LOCAL_PATH)/../../libcore)) \
402	$(addprefix ../../external/junit/, $(call junit_to_document, $(LOCAL_PATH)/../../external/junit))
403
404# These are relative to frameworks/base
405framework_docs_LOCAL_SRC_FILES := \
406	$(call find-other-java-files, $(dirs_to_document)) \
407	$(common_src_files)
408
409# These are relative to frameworks/base
410framework_docs_LOCAL_API_CHECK_SRC_FILES := \
411	$(call find-other-java-files, $(dirs_to_check_apis)) \
412	$(common_src_files)
413
414# This is used by ide.mk as the list of source files that are
415# always included.
416INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document))
417
418framework_docs_LOCAL_DROIDDOC_SOURCE_PATH := \
419	$(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
420
421framework_docs_LOCAL_INTERMEDIATE_SOURCES := \
422	$(framework_res_source_path)/android/R.java \
423	$(framework_res_source_path)/android/Manifest.java \
424	$(framework_res_source_path)/com/android/internal/R.java
425
426framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES := \
427	bouncycastle \
428	conscrypt \
429	core \
430	okhttp \
431	ext \
432	framework \
433	mms-common \
434	telephony-common \
435	voip-common
436
437framework_docs_LOCAL_JAVA_LIBRARIES := \
438	$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \
439	$(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES)
440
441framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES
442framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html
443# The since flag (-since N.xml API_LEVEL) is used to add API Level information
444# to the reference documentation. Must be in order of oldest to newest.
445framework_docs_LOCAL_DROIDDOC_OPTIONS := \
446    -knowntags ./frameworks/base/docs/knowntags.txt \
447    -since $(SRC_API_DIR)/1.xml 1 \
448    -since $(SRC_API_DIR)/2.xml 2 \
449    -since $(SRC_API_DIR)/3.xml 3 \
450    -since $(SRC_API_DIR)/4.xml 4 \
451    -since $(SRC_API_DIR)/5.xml 5 \
452    -since $(SRC_API_DIR)/6.xml 6 \
453    -since $(SRC_API_DIR)/7.xml 7 \
454    -since $(SRC_API_DIR)/8.xml 8 \
455    -since $(SRC_API_DIR)/9.xml 9 \
456    -since $(SRC_API_DIR)/10.xml 10 \
457    -since $(SRC_API_DIR)/11.xml 11 \
458    -since $(SRC_API_DIR)/12.xml 12 \
459    -since $(SRC_API_DIR)/13.xml 13 \
460    -since $(SRC_API_DIR)/14.txt 14 \
461    -since $(SRC_API_DIR)/15.txt 15 \
462    -since $(SRC_API_DIR)/16.txt 16 \
463    -since $(SRC_API_DIR)/17.txt 17 \
464    -since $(SRC_API_DIR)/18.txt 18 \
465		-werror -hide 113 \
466		-overview $(LOCAL_PATH)/core/java/overview.html
467
468framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
469	$(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
470
471framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \
472	$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR) \
473	$(foreach lib,$(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES),$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)) \
474	$(foreach lib,$(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES),$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib)-res,,COMMON))
475
476framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
477    frameworks/base/docs/knowntags.txt
478
479sample_dir := development/samples
480
481# the list here should match the list of samples included in the sdk samples package
482# (see development/build/sdk.atree)
483# remove htmlified samples for now -- samples are still available through the SDK
484# web_docs_sample_code_flags := \
485		-hdf android.hasSamples 1 \
486		-samplecode $(sample_dir)/AccelerometerPlay \
487		            resources/samples/AccelerometerPlay "Accelerometer Play" \
488		-samplecode $(sample_dir)/ActionBarCompat \
489		            resources/samples/ActionBarCompat "Action Bar Compatibility" \
490                -samplecode $(sample_dir)/AndroidBeamDemo \
491		            resources/samples/AndroidBeamDemo "Android Beam Demo" \
492		-samplecode $(sample_dir)/ApiDemos \
493		            resources/samples/ApiDemos "API Demos" \
494		-samplecode $(sample_dir)/Support4Demos \
495		            resources/samples/Support4Demos "API 4+ Support Demos" \
496		-samplecode $(sample_dir)/Support13Demos \
497		            resources/samples/Support13Demos "API 13+ Support Demos" \
498		-samplecode $(sample_dir)/BackupRestore \
499		            resources/samples/BackupRestore "Backup and Restore" \
500		-samplecode $(sample_dir)/BluetoothChat \
501		            resources/samples/BluetoothChat "Bluetooth Chat" \
502		-samplecode $(sample_dir)/BluetoothHDP \
503		            resources/samples/BluetoothHDP "Bluetooth HDP Demo" \
504		-samplecode $(sample_dir)/BusinessCard \
505		            resources/samples/BusinessCard "Business Card" \
506		-samplecode $(sample_dir)/ContactManager \
507		            resources/samples/ContactManager "Contact Manager" \
508		-samplecode $(sample_dir)/CubeLiveWallpaper \
509		            resources/samples/CubeLiveWallpaper "Cube Live Wallpaper" \
510		-samplecode $(sample_dir)/Home \
511		            resources/samples/Home "Home" \
512		-samplecode $(sample_dir)/HoneycombGallery \
513		            resources/samples/HoneycombGallery "Honeycomb Gallery" \
514		-samplecode $(sample_dir)/JetBoy \
515		            resources/samples/JetBoy "JetBoy" \
516		-samplecode $(sample_dir)/KeyChainDemo \
517		            resources/samples/KeyChainDemo "KeyChain Demo" \
518		-samplecode $(sample_dir)/LunarLander \
519		            resources/samples/LunarLander "Lunar Lander" \
520		-samplecode $(sample_dir)/training/ads-and-ux \
521		            resources/samples/training/ads-and-ux "Mobile Advertisement Integration" \
522		-samplecode $(sample_dir)/MultiResolution \
523		            resources/samples/MultiResolution "Multiple Resolutions" \
524		-samplecode $(sample_dir)/training/multiscreen/newsreader \
525		            resources/samples/newsreader "News Reader" \
526		-samplecode $(sample_dir)/NotePad \
527		            resources/samples/NotePad "Note Pad" \
528		-samplecode $(sample_dir)/SpellChecker/SampleSpellCheckerService \
529		            resources/samples/SpellChecker/SampleSpellCheckerService "Spell Checker Service" \
530		-samplecode $(sample_dir)/SpellChecker/HelloSpellChecker \
531		            resources/samples/SpellChecker/HelloSpellChecker "Spell Checker Client" \
532		-samplecode $(sample_dir)/SampleSyncAdapter \
533		            resources/samples/SampleSyncAdapter "Sample Sync Adapter" \
534		-samplecode $(sample_dir)/RandomMusicPlayer \
535		            resources/samples/RandomMusicPlayer "Random Music Player" \
536		-samplecode $(sample_dir)/RenderScript \
537		            resources/samples/RenderScript "RenderScript" \
538		-samplecode $(sample_dir)/SearchableDictionary \
539		            resources/samples/SearchableDictionary "Searchable Dictionary v2" \
540		-samplecode $(sample_dir)/SipDemo \
541		            resources/samples/SipDemo "SIP Demo" \
542		-samplecode $(sample_dir)/Snake \
543		            resources/samples/Snake "Snake" \
544		-samplecode $(sample_dir)/SoftKeyboard \
545		            resources/samples/SoftKeyboard "Soft Keyboard" \
546		-samplecode $(sample_dir)/Spinner  \
547		            resources/samples/Spinner "Spinner" \
548		-samplecode $(sample_dir)/SpinnerTest \
549		            resources/samples/SpinnerTest "SpinnerTest" \
550		-samplecode $(sample_dir)/StackWidget \
551		            resources/samples/StackWidget "StackView Widget" \
552		-samplecode $(sample_dir)/TicTacToeLib  \
553		            resources/samples/TicTacToeLib "TicTacToeLib" \
554		-samplecode $(sample_dir)/TicTacToeMain \
555		            resources/samples/TicTacToeMain "TicTacToeMain" \
556		-samplecode $(sample_dir)/ToyVpn \
557		            resources/samples/ToyVpn "Toy VPN Client" \
558		-samplecode $(sample_dir)/USB \
559		            resources/samples/USB "USB" \
560		-samplecode $(sample_dir)/WeatherListWidget \
561		            resources/samples/WeatherListWidget "Weather List Widget" \
562		-samplecode $(sample_dir)/WiFiDirectDemo \
563                            resources/samples/WiFiDirectDemo "Wi-Fi Direct Demo" \
564		-samplecode $(sample_dir)/Wiktionary \
565		            resources/samples/Wiktionary "Wiktionary" \
566		-samplecode $(sample_dir)/WiktionarySimple \
567		            resources/samples/WiktionarySimple "Wiktionary (Simplified)" \
568		-samplecode $(sample_dir)/VoiceRecognitionService \
569		            resources/samples/VoiceRecognitionService "Voice Recognition Service" \
570		-samplecode $(sample_dir)/VoicemailProviderDemo \
571		            resources/samples/VoicemailProviderDemo "Voicemail Provider Demo" \
572		-samplecode $(sample_dir)/XmlAdapters \
573		            resources/samples/XmlAdapters "XML Adapters" \
574		-samplecode $(sample_dir)/TtsEngine \
575		            resources/samples/TtsEngine "Text To Speech Engine" \
576		-samplecode $(sample_dir)/training/device-management-policy \
577		            resources/samples/training/device-management-policy "Device Management Policy"
578
579
580## SDK version identifiers used in the published docs
581  # major[.minor] version for current SDK. (full releases only)
582framework_docs_SDK_VERSION:=4.2
583  # release version (ie "Release x")  (full releases only)
584framework_docs_SDK_REL_ID:=1
585
586framework_docs_LOCAL_DROIDDOC_OPTIONS += \
587		-hdf sdk.version $(framework_docs_SDK_VERSION) \
588		-hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
589		-hdf sdk.preview 0 \
590
591# ====  the api stubs and current.xml ===========================
592include $(CLEAR_VARS)
593
594LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
595LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
596LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
597LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
598LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
599LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
600LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
601LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
602
603LOCAL_MODULE := api-stubs
604
605LOCAL_DROIDDOC_OPTIONS:=\
606		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
607		-stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_stubs_current_intermediates/src \
608		-api $(INTERNAL_PLATFORM_API_FILE) \
609		-nodocs
610
611LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
612
613LOCAL_UNINSTALLABLE_MODULE := true
614
615include $(BUILD_DROIDDOC)
616
617# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
618$(full_target): $(framework_built) $(gen)
619$(INTERNAL_PLATFORM_API_FILE): $(full_target)
620$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
621
622# ====  check javadoc comments but don't generate docs ========
623include $(CLEAR_VARS)
624
625LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
626LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
627LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
628LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
629LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
630LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
631LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
632LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
633
634LOCAL_MODULE := doc-comment-check
635
636LOCAL_DROIDDOC_OPTIONS:=\
637		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
638		-parsecomments
639
640LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
641
642LOCAL_UNINSTALLABLE_MODULE := true
643
644include $(BUILD_DROIDDOC)
645
646# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
647$(full_target): $(framework_built) $(gen)
648
649# Run this for checkbuild
650.PHONY: checkbuild
651checkbuild: doc-comment-check-docs
652
653# ====  static html in the sdk ==================================
654include $(CLEAR_VARS)
655
656LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
657LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
658LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
659LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
660LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
661LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
662LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
663LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
664
665LOCAL_MODULE := offline-sdk
666
667LOCAL_DROIDDOC_OPTIONS:=\
668		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
669                $(web_docs_sample_code_flags) \
670                -offlinemode \
671		-title "Android SDK" \
672		-proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
673		-todo $(OUT_DOCS)/$(LOCAL_MODULE)-docs-todo.html \
674		-sdkvalues $(OUT_DOCS) \
675		-hdf android.whichdoc offline
676
677
678LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
679
680include $(BUILD_DROIDDOC)
681
682static_doc_index_redirect := $(out_dir)/index.html
683$(static_doc_index_redirect): \
684	$(LOCAL_PATH)/docs/docs-documentation-redirect.html | $(ACP)
685	$(hide) mkdir -p $(dir $@)
686	$(hide) $(ACP) $< $@
687
688$(full_target): $(static_doc_index_redirect)
689$(full_target): $(framework_built)
690
691# ==== docs for the web (on the androiddevdocs app engine server) =======================
692include $(CLEAR_VARS)
693
694LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
695LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
696LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
697LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
698LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
699LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
700LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
701LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
702LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
703LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /intl/
704
705LOCAL_MODULE := online-sdk
706
707LOCAL_DROIDDOC_OPTIONS:= \
708		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
709		$(web_docs_sample_code_flags) \
710		-toroot / \
711		-hdf android.whichdoc online \
712		-hdf template.showLanguageMenu true
713
714LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
715
716include $(BUILD_DROIDDOC)
717
718# ==== docs for the web (on the devsite app engine server) =======================
719include $(CLEAR_VARS)
720LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
721LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
722LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
723LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
724LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
725LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
726LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
727LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
728LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
729# specify a second html input dir and an output path relative to OUT_DIR)
730LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
731
732LOCAL_MODULE := ds
733
734LOCAL_DROIDDOC_OPTIONS:= \
735		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
736		$(web_docs_sample_code_flags) \
737		-devsite \
738		-toroot / \
739		-hdf android.whichdoc online \
740		-hdf devsite true
741
742LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
743
744include $(BUILD_DROIDDOC)
745
746# ==== docs that have all of the stuff that's @hidden =======================
747include $(CLEAR_VARS)
748
749LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
750LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
751LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) framework
752LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
753LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
754LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
755LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
756LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
757
758LOCAL_MODULE := hidden
759LOCAL_DROIDDOC_OPTIONS:=\
760		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
761		-title "Android SDK - Including hidden APIs."
762#		-hidden
763
764LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
765
766include $(BUILD_DROIDDOC)
767
768# Build ext.jar
769# ============================================================
770
771# NOTICE notes for non-obvious sections
772# apache-http - covered by the Apache Commons section.
773
774
775ext_dirs := \
776	../../external/nist-sip/java \
777	../../external/apache-http/src \
778	../../external/tagsoup/src \
779	../../external/libphonenumber/java/src
780
781ext_src_files := $(call all-java-files-under,$(ext_dirs))
782
783ext_res_dirs := \
784	../../external/libphonenumber/java/src
785
786# ====  the library  =========================================
787include $(CLEAR_VARS)
788
789LOCAL_SRC_FILES := $(ext_src_files)
790
791LOCAL_NO_STANDARD_LIBRARIES := true
792LOCAL_JAVA_LIBRARIES := core
793LOCAL_JAVA_RESOURCE_DIRS := $(ext_res_dirs)
794LOCAL_MODULE_TAGS := optional
795LOCAL_MODULE := ext
796
797LOCAL_DX_FLAGS := --core-library
798
799include $(BUILD_JAVA_LIBRARY)
800
801
802# Include subdirectory makefiles
803# ============================================================
804
805# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
806# team really wants is to build the stuff defined by this makefile.
807ifeq (,$(ONE_SHOT_MAKEFILE))
808include $(call first-makefiles-under,$(LOCAL_PATH))
809endif
810