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