gecko-dev/mobile/android/base/moz.build

867 lines
33 KiB
Python

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['locales']
SPHINX_TREES['fennec'] = 'docs'
include('android-services.mozbuild')
thirdparty_source_dir = TOPSRCDIR + '/mobile/android/thirdparty/'
constants_jar = add_java_jar('constants')
constants_jar.sources = []
constants_jar.generated_sources = [
'preprocessed/org/mozilla/gecko/AppConstants.java',
'preprocessed/org/mozilla/gecko/SysInfo.java',
]
constants_jar.generated_sources += ['preprocessed/org/mozilla/gecko/' + f for f in sync_generated_java_files]
resjar = add_java_jar('gecko-R')
resjar.sources = []
resjar.generated_sources += [
'org/mozilla/gecko/R.java',
]
if CONFIG['MOZ_NATIVE_DEVICES']:
resjar.generated_sources += ['com/google/android/gms/R.java']
resjar.generated_sources += ['android/support/v7/appcompat/R.java']
resjar.generated_sources += ['android/support/v7/mediarouter/R.java']
resjar.javac_flags += ['-Xlint:all']
mgjar = add_java_jar('gecko-mozglue')
mgjar.sources += [
'mozglue/ByteBufferInputStream.java',
'mozglue/ContextUtils.java',
'mozglue/DirectBufferAllocator.java',
'mozglue/GeckoLoader.java',
'mozglue/generatorannotations/OptionalGeneratedParameter.java',
'mozglue/generatorannotations/WrapElementForJNI.java',
'mozglue/generatorannotations/WrapEntireClassForJNI.java',
'mozglue/JNITarget.java',
'mozglue/NativeReference.java',
'mozglue/NativeZip.java',
'mozglue/RobocopTarget.java',
'mozglue/WebRTCJNITarget.java',
]
mgjar.generated_sources = [] # Keep it this way.
mgjar.extra_jars += [
'constants.jar',
]
mgjar.javac_flags += ['-Xlint:all']
gujar = add_java_jar('gecko-util')
gujar.sources += [
'util/ActivityResultHandler.java',
'util/ActivityResultHandlerMap.java',
'util/ActivityUtils.java',
'util/Clipboard.java',
'util/EventCallback.java',
'util/FileUtils.java',
'util/FloatUtils.java',
'util/GamepadUtils.java',
'util/GeckoBackgroundThread.java',
'util/GeckoEventListener.java',
'util/GeckoJarReader.java',
'util/GeckoRequest.java',
'util/HardwareUtils.java',
'util/INIParser.java',
'util/INISection.java',
'util/IOUtils.java',
'util/JSONUtils.java',
'util/MenuUtils.java',
'util/NativeEventListener.java',
'util/NativeJSContainer.java',
'util/NativeJSObject.java',
'util/NonEvictingLruCache.java',
'util/PrefUtils.java',
'util/ProxySelector.java',
'util/RawResource.java',
'util/StringUtils.java',
'util/ThreadUtils.java',
'util/UIAsyncTask.java',
'util/WebActivityMapper.java',
]
gujar.extra_jars = [
'constants.jar',
'gecko-mozglue.jar',
]
gujar.javac_flags += ['-Xlint:all,-deprecation']
stjar = add_java_jar('sync-thirdparty')
stjar.sources += [ thirdparty_source_dir + f for f in sync_thirdparty_java_files ]
stjar.javac_flags = ['-Xlint:none']
if CONFIG['MOZ_WEBRTC']:
video_root = TOPSRCDIR + '/media/webrtc/trunk/webrtc/modules/video_capture/android/java/src/org/webrtc/videoengine/'
video_render_root = TOPSRCDIR + '/media/webrtc/trunk/webrtc/modules/video_render/android/java/src/org/webrtc/videoengine/'
audio_root = TOPSRCDIR + '/media/webrtc/trunk/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/'
wrjar = add_java_jar('webrtc')
wrjar.sources += [
video_root + 'CaptureCapabilityAndroid.java',
video_root + 'VideoCaptureAndroid.java',
video_root + 'VideoCaptureDeviceInfoAndroid.java',
video_render_root + 'ViEAndroidGLES20.java',
video_render_root + 'ViERenderer.java',
]
wrjar.sources += [
audio_root + 'AudioManagerAndroid.java',
audio_root + 'WebRtcAudioRecord.java',
audio_root + 'WebRtcAudioTrack.java',
]
wrjar.extra_jars = [
'gecko-R.jar',
'gecko-browser.jar',
'gecko-util.jar',
'gecko-mozglue.jar',
]
wrjar.javac_flags += ['-Xlint:all,-deprecation,-cast']
gbjar = add_java_jar('gecko-browser')
gbjar.sources += [
'AboutPages.java',
'ActionModeCompat.java',
'ActionModeCompatView.java',
'ActivityHandlerHelper.java',
'AlertNotification.java',
'AndroidGamepadManager.java',
'animation/AnimationUtils.java',
'animation/AnimatorProxy.java',
'animation/BounceAnimator.java',
'animation/HeightChangeAnimation.java',
'animation/PropertyAnimator.java',
'animation/Rotate3DAnimation.java',
'animation/TransitionsTracker.java',
'animation/ViewHelper.java',
'ANRReporter.java',
'AppNotificationClient.java',
'Assert.java',
'BaseGeckoInterface.java',
'BrowserApp.java',
'BrowserLocaleManager.java',
'ContactService.java',
'ContextGetter.java',
'CrashHandler.java',
'CustomEditText.java',
'DataReportingNotification.java',
'db/AbstractPerProfileDatabaseProvider.java',
'db/AbstractTransactionalProvider.java',
'db/BaseTable.java',
'db/BrowserContract.java',
'db/BrowserDatabaseHelper.java',
'db/BrowserDB.java',
'db/BrowserProvider.java',
'db/DBUtils.java',
'db/FormHistoryProvider.java',
'db/HomeProvider.java',
'db/LocalBrowserDB.java',
'db/PasswordsProvider.java',
'db/PerProfileDatabaseProvider.java',
'db/PerProfileDatabases.java',
'db/ReadingListProvider.java',
'db/SearchHistoryProvider.java',
'db/SharedBrowserDatabaseProvider.java',
'db/SQLiteBridgeContentProvider.java',
'db/SuggestedSites.java',
'db/Table.java',
'db/TabsProvider.java',
'db/TopSitesCursorWrapper.java',
'db/URLMetadata.java',
'db/URLMetadataTable.java',
'distribution/Distribution.java',
'distribution/ReferrerDescriptor.java',
'distribution/ReferrerReceiver.java',
'DoorHangerPopup.java',
'DownloadsIntegration.java',
'DynamicToolbar.java',
'EditBookmarkDialog.java',
'EventDispatcher.java',
'favicons/cache/FaviconCache.java',
'favicons/cache/FaviconCacheElement.java',
'favicons/cache/FaviconsForURL.java',
'favicons/decoders/FaviconDecoder.java',
'favicons/decoders/ICODecoder.java',
'favicons/decoders/IconDirectoryEntry.java',
'favicons/decoders/LoadFaviconResult.java',
'favicons/Favicons.java',
'favicons/LoadFaviconTask.java',
'favicons/OnFaviconLoadedListener.java',
'favicons/RemoteFavicon.java',
'FilePicker.java',
'FilePickerResultHandler.java',
'FindInPageBar.java',
'FormAssistPopup.java',
'GeckoAccessibility.java',
'GeckoActivity.java',
'GeckoActivityStatus.java',
'GeckoApp.java',
'GeckoApplication.java',
'GeckoAppShell.java',
'GeckoBatteryManager.java',
'GeckoConnectivityReceiver.java',
'GeckoEditable.java',
'GeckoEditableClient.java',
'GeckoEditableListener.java',
'GeckoEvent.java',
'GeckoHalDefines.java',
'GeckoInputConnection.java',
'GeckoJavaSampler.java',
'GeckoMessageReceiver.java',
'GeckoNetworkManager.java',
'GeckoProfile.java',
'GeckoProfileDirectories.java',
'GeckoProfilesProvider.java',
'GeckoScreenOrientation.java',
'GeckoSharedPrefs.java',
'GeckoSmsManager.java',
'GeckoThread.java',
'GeckoUpdateReceiver.java',
'GeckoView.java',
'GeckoViewChrome.java',
'GeckoViewContent.java',
'gfx/Axis.java',
'gfx/BitmapUtils.java',
'gfx/BufferedCairoImage.java',
'gfx/CairoGLInfo.java',
'gfx/CairoImage.java',
'gfx/CairoUtils.java',
'gfx/DisplayPortCalculator.java',
'gfx/DisplayPortMetrics.java',
'gfx/DrawTimingQueue.java',
'gfx/FloatSize.java',
'gfx/FullScreenState.java',
'gfx/GeckoLayerClient.java',
'gfx/GLController.java',
'gfx/ImmutableViewportMetrics.java',
'gfx/InputConnectionHandler.java',
'gfx/IntSize.java',
'gfx/JavaPanZoomController.java',
'gfx/Layer.java',
'gfx/LayerMarginsAnimator.java',
'gfx/LayerRenderer.java',
'gfx/LayerView.java',
'gfx/NativePanZoomController.java',
'gfx/Overscroll.java',
'gfx/OverscrollEdgeEffect.java',
'gfx/PanningPerfAPI.java',
'gfx/PanZoomController.java',
'gfx/PanZoomTarget.java',
'gfx/PluginLayer.java',
'gfx/PointUtils.java',
'gfx/ProgressiveUpdateData.java',
'gfx/RectUtils.java',
'gfx/RenderTask.java',
'gfx/ScrollbarLayer.java',
'gfx/SimpleScaleGestureDetector.java',
'gfx/SubdocumentScrollHelper.java',
'gfx/TextureGenerator.java',
'gfx/TextureReaper.java',
'gfx/TileLayer.java',
'gfx/TouchEventHandler.java',
'gfx/ViewTransform.java',
'gfx/VirtualLayer.java',
'GlobalHistory.java',
'GuestSession.java',
'health/BrowserHealthRecorder.java',
'health/BrowserHealthReporter.java',
'health/HealthRecorder.java',
'health/SessionInformation.java',
'health/StubbedHealthRecorder.java',
'home/BookmarkFolderView.java',
'home/BookmarksListAdapter.java',
'home/BookmarksListView.java',
'home/BookmarksPanel.java',
'home/BrowserSearch.java',
'home/DynamicPanel.java',
'home/FramePanelLayout.java',
'home/HistoryPanel.java',
'home/HomeAdapter.java',
'home/HomeBanner.java',
'home/HomeConfig.java',
'home/HomeConfigLoader.java',
'home/HomeConfigPrefsBackend.java',
'home/HomeContextMenuInfo.java',
'home/HomeExpandableListView.java',
'home/HomeFragment.java',
'home/HomeListView.java',
'home/HomePager.java',
'home/HomePagerTabStrip.java',
'home/HomePanelsManager.java',
'home/ImageLoader.java',
'home/MultiTypeCursorAdapter.java',
'home/PanelAuthCache.java',
'home/PanelAuthLayout.java',
'home/PanelBackItemView.java',
'home/PanelGridView.java',
'home/PanelInfoManager.java',
'home/PanelItemView.java',
'home/PanelLayout.java',
'home/PanelListView.java',
'home/PanelRefreshLayout.java',
'home/PanelViewAdapter.java',
'home/PanelViewItemHandler.java',
'home/PinSiteDialog.java',
'home/ReadingListPanel.java',
'home/ReadingListRow.java',
'home/RecentTabsPanel.java',
'home/RemoteTabsExpandableListFragment.java',
'home/RemoteTabsExpandableListState.java',
'home/RemoteTabsPanel.java',
'home/RemoteTabsStaticFragment.java',
'home/SearchEngine.java',
'home/SearchEngineRow.java',
'home/SearchLoader.java',
'home/SimpleCursorLoader.java',
'home/TabMenuStrip.java',
'home/TabMenuStripLayout.java',
'home/TopSitesGridItemView.java',
'home/TopSitesGridView.java',
'home/TopSitesPanel.java',
'home/TopSitesThumbnailView.java',
'home/TransitionAwareCursorLoaderCallbacks.java',
'home/TwoLinePageRow.java',
'InputMethods.java',
'IntentHelper.java',
'JavaAddonManager.java',
'LocaleManager.java',
'Locales.java',
'lwt/LightweightTheme.java',
'lwt/LightweightThemeDrawable.java',
'MediaCastingBar.java',
'MemoryMonitor.java',
'menu/GeckoMenu.java',
'menu/GeckoMenuInflater.java',
'menu/GeckoMenuItem.java',
'menu/GeckoSubMenu.java',
'menu/MenuItemActionBar.java',
'menu/MenuItemActionView.java',
'menu/MenuItemDefault.java',
'menu/MenuPanel.java',
'menu/MenuPopup.java',
'MotionEventInterceptor.java',
'NewTabletUI.java',
'NotificationClient.java',
'NotificationHandler.java',
'NotificationHelper.java',
'NotificationService.java',
'NSSBridge.java',
'OrderedBroadcastHelper.java',
'preferences/AlignRightLinkPreference.java',
'preferences/AndroidImport.java',
'preferences/AndroidImportPreference.java',
'preferences/ClearOnShutdownPref.java',
'preferences/CustomCheckBoxPreference.java',
'preferences/CustomListCategory.java',
'preferences/CustomListPreference.java',
'preferences/FontSizePreference.java',
'preferences/GeckoPreferenceFragment.java',
'preferences/GeckoPreferences.java',
'preferences/LinkPreference.java',
'preferences/ListCheckboxPreference.java',
'preferences/LocaleListPreference.java',
'preferences/ModifiableHintPreference.java',
'preferences/MultiChoicePreference.java',
'preferences/MultiPrefMultiChoicePreference.java',
'preferences/PanelsPreference.java',
'preferences/PanelsPreferenceCategory.java',
'preferences/PrivateDataPreference.java',
'preferences/SearchEnginePreference.java',
'preferences/SearchPreferenceCategory.java',
'preferences/SyncPreference.java',
'PrefsHelper.java',
'PrivateTab.java',
'prompts/ColorPickerInput.java',
'prompts/IconGridInput.java',
'prompts/IntentChooserPrompt.java',
'prompts/IntentHandler.java',
'prompts/Prompt.java',
'prompts/PromptInput.java',
'prompts/PromptListAdapter.java',
'prompts/PromptListItem.java',
'prompts/PromptService.java',
'prompts/TabInput.java',
'ReaderModeUtils.java',
'ReadingListHelper.java',
'RemoteClientsDialogFragment.java',
'RemoteTabsExpandableListAdapter.java',
'Restarter.java',
'RestrictedProfiles.java',
'ScrollAnimator.java',
'ServiceNotificationClient.java',
'SessionParser.java',
'SharedPreferencesHelper.java',
'SiteIdentity.java',
'SmsManager.java',
'sqlite/ByteBufferInputStream.java',
'sqlite/MatrixBlobCursor.java',
'sqlite/SQLiteBridge.java',
'sqlite/SQLiteBridgeException.java',
'StartPane.java',
'SuggestClient.java',
'SurfaceBits.java',
'Tab.java',
'Tabs.java',
'tabs/PrivateTabsPanel.java',
'tabs/TabCurve.java',
'tabs/TabHistoryController.java',
'tabs/TabHistoryFragment.java',
'tabs/TabHistoryItemRow.java',
'tabs/TabHistoryPage.java',
'tabs/TabsGridLayout.java',
'tabs/TabsLayoutAdapter.java',
'tabs/TabsLayoutItemView.java',
'tabs/TabsListLayout.java',
'tabs/TabsPanel.java',
'TabsAccessor.java',
'Telemetry.java',
'TelemetryContract.java',
'TextSelection.java',
'TextSelectionHandle.java',
'ThumbnailHelper.java',
'tiles/Tile.java',
'tiles/TilesRecorder.java',
'toolbar/ActionBarViewFlipper.java',
'toolbar/AutocompleteHandler.java',
'toolbar/BackButton.java',
'toolbar/BrowserToolbar.java',
'toolbar/BrowserToolbarNewTablet.java',
'toolbar/BrowserToolbarPhone.java',
'toolbar/BrowserToolbarPhoneBase.java',
'toolbar/BrowserToolbarPreHC.java',
'toolbar/BrowserToolbarTablet.java',
'toolbar/BrowserToolbarTabletBase.java',
'toolbar/CanvasDelegate.java',
'toolbar/ForwardButton.java',
'toolbar/NavButton.java',
'toolbar/PageActionLayout.java',
'toolbar/PhoneTabsButton.java',
'toolbar/ShapedButton.java',
'toolbar/SiteIdentityPopup.java',
'toolbar/TabCounter.java',
'toolbar/TabletTabsButton.java',
'toolbar/ToolbarDisplayLayout.java',
'toolbar/ToolbarEditLayout.java',
'toolbar/ToolbarEditText.java',
'toolbar/ToolbarPrefs.java',
'toolbar/ToolbarProgressView.java',
'TouchEventInterceptor.java',
'updater/UpdateService.java',
'updater/UpdateServiceHelper.java',
'Webapp.java',
'webapp/Allocator.java',
'webapp/ApkResources.java',
'webapp/Dispatcher.java',
'webapp/EventListener.java',
'webapp/InstallHelper.java',
'webapp/InstallListener.java',
'webapp/TaskKiller.java',
'webapp/UninstallListener.java',
'webapp/WebappImpl.java',
'webapp/Webapps.java',
'widget/ActivityChooserModel.java',
'widget/AllCapsTextView.java',
'widget/AnimatedHeightLayout.java',
'widget/ArrowPopup.java',
'widget/BasicColorPicker.java',
'widget/ButtonToast.java',
'widget/CheckableLinearLayout.java',
'widget/ClickableWhenDisabledEditText.java',
'widget/DateTimePicker.java',
'widget/Divider.java',
'widget/DoorHanger.java',
'widget/EllipsisTextView.java',
'widget/FadedMultiColorTextView.java',
'widget/FadedSingleColorTextView.java',
'widget/FadedTextView.java',
'widget/FaviconView.java',
'widget/FloatingHintEditText.java',
'widget/FlowLayout.java',
'widget/GeckoActionProvider.java',
'widget/GeckoPopupMenu.java',
'widget/GeckoSwipeRefreshLayout.java',
'widget/GeckoViewFlipper.java',
'widget/IconTabWidget.java',
'widget/ResizablePathDrawable.java',
'widget/SquaredImageView.java',
'widget/SwipeDismissListViewTouchListener.java',
'widget/TabThumbnailWrapper.java',
'widget/ThumbnailView.java',
'widget/TwoWayView.java',
'ZoomConstraints.java',
]
# The following sources are checked in to version control but
# generated by a script (widget/generate_themed_views.py). If you're
# editing this list, make sure to edit that script.
gbjar.sources += [
'widget/ThemedEditText.java',
'widget/ThemedImageButton.java',
'widget/ThemedImageView.java',
'widget/ThemedLinearLayout.java',
'widget/ThemedRelativeLayout.java',
'widget/ThemedTextSwitcher.java',
'widget/ThemedTextView.java',
'widget/ThemedView.java',
]
gbjar.sources += [ thirdparty_source_dir + f for f in [
'com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java',
'com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java',
'com/googlecode/eyesfree/braille/selfbraille/WriteData.java',
] ]
android_package_dir = CONFIG['ANDROID_PACKAGE_NAME'].replace('.', '/')
gbjar.generated_sources = [] # Keep it this way.
gbjar.extra_jars += [
'constants.jar'
]
if CONFIG['MOZ_CRASHREPORTER']:
gbjar.sources += [ 'CrashReporter.java' ]
ANDROID_RES_DIRS += [ SRCDIR + '/crashreporter/res' ]
if CONFIG['MOZ_ANDROID_SHARE_OVERLAY']:
gbjar.sources += [
'overlays/OverlayConstants.java',
'overlays/service/OverlayActionService.java',
'overlays/service/ShareData.java',
'overlays/service/sharemethods/AddBookmark.java',
'overlays/service/sharemethods/AddToReadingList.java',
'overlays/service/sharemethods/ParcelableClientRecord.java',
'overlays/service/sharemethods/SendTab.java',
'overlays/service/sharemethods/ShareMethod.java',
'overlays/ui/OverlayDialogButton.java',
'overlays/ui/OverlayToastHelper.java',
'overlays/ui/SendTabDeviceListArrayAdapter.java',
'overlays/ui/SendTabList.java',
'overlays/ui/SendTabTargetSelectedListener.java',
'overlays/ui/ShareDialog.java',
]
if (CONFIG['MOZ_ANDROID_MAX_SDK_VERSION']):
max_sdk_version = int(CONFIG['MOZ_ANDROID_MAX_SDK_VERSION'])
else:
max_sdk_version = 999
# Only bother to include new tablet code if we're building for tablet-capable
# OS releases.
if CONFIG['MOZ_ANDROID_NEW_TABLET_UI'] and max_sdk_version >= 11:
gbjar.sources += [
'tabs/TabStrip.java',
'tabs/TabStripAdapter.java',
'tabs/TabStripItemView.java',
'tabs/TabStripView.java'
]
gbjar.sources += sync_java_files
gbjar.extra_jars += [
'gecko-R.jar',
'gecko-mozglue.jar',
'gecko-thirdparty.jar',
'gecko-util.jar',
'sync-thirdparty.jar',
]
moz_native_devices_jars = [
CONFIG['ANDROID_APPCOMPAT_LIB'],
CONFIG['ANDROID_MEDIAROUTER_LIB'],
CONFIG['GOOGLE_PLAY_SERVICES_LIB'],
]
moz_native_devices_sources = [
'ChromeCast.java',
'GeckoMediaPlayer.java',
'MediaPlayerManager.java',
]
if CONFIG['MOZ_NATIVE_DEVICES']:
gbjar.extra_jars += moz_native_devices_jars
gbjar.sources += moz_native_devices_sources
gbjar.javac_flags += ['-Xlint:all,-deprecation,-fallthrough', '-J-Xmx512m', '-J-Xms128m']
# gecko-thirdparty is a good place to put small independent libraries
gtjar = add_java_jar('gecko-thirdparty')
gtjar.sources += [ thirdparty_source_dir + f for f in [
'com/nineoldandroids/animation/Animator.java',
'com/nineoldandroids/animation/AnimatorInflater.java',
'com/nineoldandroids/animation/AnimatorListenerAdapter.java',
'com/nineoldandroids/animation/AnimatorSet.java',
'com/nineoldandroids/animation/ArgbEvaluator.java',
'com/nineoldandroids/animation/FloatEvaluator.java',
'com/nineoldandroids/animation/FloatKeyframeSet.java',
'com/nineoldandroids/animation/IntEvaluator.java',
'com/nineoldandroids/animation/IntKeyframeSet.java',
'com/nineoldandroids/animation/Keyframe.java',
'com/nineoldandroids/animation/KeyframeSet.java',
'com/nineoldandroids/animation/ObjectAnimator.java',
'com/nineoldandroids/animation/PreHoneycombCompat.java',
'com/nineoldandroids/animation/PropertyValuesHolder.java',
'com/nineoldandroids/animation/TimeAnimator.java',
'com/nineoldandroids/animation/TypeEvaluator.java',
'com/nineoldandroids/animation/ValueAnimator.java',
'com/nineoldandroids/util/FloatProperty.java',
'com/nineoldandroids/util/IntProperty.java',
'com/nineoldandroids/util/NoSuchPropertyException.java',
'com/nineoldandroids/util/Property.java',
'com/nineoldandroids/util/ReflectiveProperty.java',
'com/nineoldandroids/view/animation/AnimatorProxy.java',
'com/nineoldandroids/view/ViewHelper.java',
'com/nineoldandroids/view/ViewPropertyAnimator.java',
'com/nineoldandroids/view/ViewPropertyAnimatorHC.java',
'com/nineoldandroids/view/ViewPropertyAnimatorICS.java',
'com/nineoldandroids/view/ViewPropertyAnimatorPreHC.java',
'com/readystatesoftware/systembartint/SystemBarTintManager.java',
'com/squareup/picasso/Action.java',
'com/squareup/picasso/AssetBitmapHunter.java',
'com/squareup/picasso/BitmapHunter.java',
'com/squareup/picasso/Cache.java',
'com/squareup/picasso/Callback.java',
'com/squareup/picasso/ContactsPhotoBitmapHunter.java',
'com/squareup/picasso/ContentStreamBitmapHunter.java',
'com/squareup/picasso/DeferredRequestCreator.java',
'com/squareup/picasso/Dispatcher.java',
'com/squareup/picasso/Downloader.java',
'com/squareup/picasso/FetchAction.java',
'com/squareup/picasso/FileBitmapHunter.java',
'com/squareup/picasso/GetAction.java',
'com/squareup/picasso/ImageViewAction.java',
'com/squareup/picasso/LruCache.java',
'com/squareup/picasso/MarkableInputStream.java',
'com/squareup/picasso/MediaStoreBitmapHunter.java',
'com/squareup/picasso/NetworkBitmapHunter.java',
'com/squareup/picasso/Picasso.java',
'com/squareup/picasso/PicassoDrawable.java',
'com/squareup/picasso/PicassoExecutorService.java',
'com/squareup/picasso/Request.java',
'com/squareup/picasso/RequestCreator.java',
'com/squareup/picasso/ResourceBitmapHunter.java',
'com/squareup/picasso/Stats.java',
'com/squareup/picasso/StatsSnapshot.java',
'com/squareup/picasso/Target.java',
'com/squareup/picasso/TargetAction.java',
'com/squareup/picasso/Transformation.java',
'com/squareup/picasso/UrlConnectionDownloader.java',
'com/squareup/picasso/Utils.java'
] ]
#gtjar.javac_flags += ['-Xlint:all']
if not CONFIG['MOZILLA_OFFICIAL']:
gtjar.sources += [ thirdparty_source_dir + f for f in [
'org/lucasr/dspec/DesignSpec.java',
'org/lucasr/dspec/RawResource.java'
] ]
ANDROID_RES_DIRS += [
SRCDIR + '/resources',
TOPSRCDIR + '/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res',
OBJDIR + '/res',
]
ANDROID_GENERATED_RESFILES += [
'res/raw/suggestedsites.json',
'res/values/strings.xml',
]
for var in ('MOZ_ANDROID_ANR_REPORTER', 'MOZ_LINKER_EXTRACT', 'MOZILLA_OFFICIAL', 'MOZ_DEBUG',
'MOZ_ANDROID_SEARCH_ACTIVITY', 'MOZ_NATIVE_DEVICES', 'MOZ_ANDROID_MLS_STUMBLER',
'MOZ_ANDROID_SHARE_OVERLAY', 'MOZ_ANDROID_DOWNLOADS_INTEGRATION',
'MOZ_ANDROID_NEW_TABLET_UI'):
if CONFIG[var]:
DEFINES[var] = 1
for var in ('MOZ_UPDATER', 'MOZ_PKG_SPECIAL'):
if CONFIG[var]:
DEFINES[var] = CONFIG[var]
for var in ('ANDROID_PACKAGE_NAME', 'ANDROID_CPU_ARCH', 'CPU_ARCH',
'GRE_MILESTONE', 'MOZ_APP_BASENAME',
'MOZ_APP_DISPLAYNAME', 'MOZ_APP_ID', 'MOZ_APP_NAME',
'MOZ_APP_VENDOR', 'MOZ_APP_VERSION', 'MOZ_CHILD_PROCESS_NAME',
'MOZ_CRASHREPORTER', 'MOZ_UPDATE_CHANNEL', 'OMNIJAR_NAME',
'OS_TARGET', 'TARGET_XPCOM_ABI'):
DEFINES[var] = CONFIG[var]
# Mangle our package name to avoid Bug 750548.
DEFINES['MANGLED_ANDROID_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME'].replace('fennec', 'f3nn3c')
DEFINES['MOZ_APP_ABI'] = CONFIG['TARGET_XPCOM_ABI']
if '-march=armv7' in CONFIG['OS_CFLAGS']:
DEFINES['MOZ_MIN_CPU_VERSION'] = 7
else:
DEFINES['MOZ_MIN_CPU_VERSION'] = 5
if CONFIG['MOZ_ANDROID_SEARCH_ACTIVITY']:
# The Search Activity is mostly independent of Fennec proper, but
# it does depend on Geckoview. Therefore, we build it as a jar
# that depends on the Geckoview jars.
search_source_dir = SRCDIR + '/../search'
include('../search/search_activity_sources.mozbuild')
search_activity = add_java_jar('search-activity')
search_activity.sources += [search_source_dir + '/' + f for f in search_activity_sources]
search_activity.javac_flags += ['-Xlint:all']
search_activity.extra_jars = [
'constants.jar',
'gecko-R.jar',
'gecko-browser.jar',
'gecko-mozglue.jar',
'gecko-thirdparty.jar',
'gecko-util.jar'
]
generated_recursive_make_targets = ['.aapt.deps', '.locales.deps'] # Captures dependencies on Android manifest and all resources.
generated = add_android_eclipse_library_project('FennecResourcesGenerated')
generated.package_name = 'org.mozilla.gecko.generated'
generated.res = OBJDIR + '/res'
generated.recursive_make_targets += generated_recursive_make_targets
branding = add_android_eclipse_library_project('FennecResourcesBranding')
branding.package_name = 'org.mozilla.gecko.branding'
branding.res = TOPSRCDIR + '/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res'
branding.recursive_make_targets += generated_recursive_make_targets
static = add_android_eclipse_library_project('FennecResourcesStatic')
# 'org.mozilla.gecko.static' is not a valid Java package name, so we use a different one.
static.package_name = 'org.mozilla.gecko.resources'
static.res = SRCDIR + '/resources'
static.recursive_make_targets += generated_recursive_make_targets
static.included_projects += ['../' + generated.name, '../' + branding.name]
static.referenced_projects += ['../' + generated.name, '../' + branding.name]
main = add_android_eclipse_project('Fennec', OBJDIR + '/AndroidManifest.xml')
main.package_name = 'org.mozilla.gecko'
# These values were extracted from an existing Eclipse project. Use
# Project > Resource > Resource Filters and inspect the resulting
# .project file to modify this list.
main.filtered_resources += [
'1.0-projectRelativePath-matches-false-false-*org/mozilla/gecko/resources/**',
'1.0-projectRelativePath-matches-false-false-*org/mozilla/gecko/tests/**',
]
main.recursive_make_targets += generated_recursive_make_targets
main.recursive_make_targets += ['generated/' + f for f in mgjar.generated_sources]
main.recursive_make_targets += ['generated/' + f for f in gbjar.generated_sources]
main.extra_jars += [CONFIG['ANDROID_COMPAT_LIB']]
main.assets = TOPOBJDIR + '/dist/' + CONFIG['MOZ_APP_NAME'] + '/assets'
main.libs = [
(TOPOBJDIR + '/dist/' + CONFIG['MOZ_APP_NAME'] + '/lib/' + CONFIG['ANDROID_CPU_ARCH'] + '/libmozglue.so',
'libs/' + CONFIG['ANDROID_CPU_ARCH'] + '/libmozglue.so'),
(TOPOBJDIR + '/dist/' + CONFIG['MOZ_APP_NAME'] + '/lib/' + CONFIG['ANDROID_CPU_ARCH'] + '/libplugin-container.so',
'libs/' + CONFIG['ANDROID_CPU_ARCH'] + '/libplugin-container.so'),
]
main.res = None
cpe = main.add_classpathentry('src', SRCDIR,
dstdir='src/org/mozilla/gecko',
exclude_patterns=[
'org/mozilla/gecko/tests/**',
'org/mozilla/gecko/resources/**'])
if not CONFIG['MOZ_CRASHREPORTER']:
cpe.exclude_patterns += ['org/mozilla/gecko/CrashReporter.java']
if CONFIG['MOZ_NATIVE_DEVICES']:
# This is rather hacky, but: we define three Eclipse projects for appcompat,
# mediarouter, and Google Play Services. mediarouter depends on appcompat;
# Google Play Services depends on both mediarouter and appcompat. The three
# projects are "resources only" because it is difficult to arrange for
# exactly one version of each shipped Java JAR file to end up in the final
# APK when including the JARs in the Eclipse projects. To work around this,
# we instead add all the JAR files to the main Fennec project.
appcompat = add_android_eclipse_library_project('appcompat')
appcompat.package_name = 'android.support.v7.appcompat'
appcompat.res = CONFIG['ANDROID_APPCOMPAT_RES']
mediarouter = add_android_eclipse_library_project('mediarouter')
mediarouter.package_name = 'android.support.v7.mediarouter'
mediarouter.res = CONFIG['ANDROID_MEDIAROUTER_RES']
mediarouter.included_projects += ['../' + appcompat.name]
mediarouter.referenced_projects += ['../' + appcompat.name]
gps = add_android_eclipse_library_project('google-play-services_lib')
gps.package_name = 'com.google.android.gms'
gps.res = CONFIG['GOOGLE_PLAY_SERVICES_RES']
gps.included_projects += ['../' + appcompat.name, '../' + mediarouter.name]
gps.referenced_projects += ['../' + appcompat.name, '../' + mediarouter.name]
main.included_projects += ['../' + gps.name, '../' + appcompat.name, '../' + mediarouter.name]
main.referenced_projects += ['../' + gps.name, '../' + appcompat.name, '../' + mediarouter.name]
main.extra_jars += moz_native_devices_jars
else:
cpe.exclude_patterns += moz_native_devices_sources
# The generated/ directory includes both files generated by aapt (R.java and
# Manifest.java for all packages) but also preprocessed files. In the past, the
# generated R.java files were used by the Eclipse build, but now Eclipse
# generates these files itself. Therefore, we exclude those generated sources.
main.add_classpathentry('generated', OBJDIR + '/generated/preprocessed',
dstdir='generated')
main.add_classpathentry('thirdparty', TOPSRCDIR + '/mobile/android/thirdparty',
dstdir='thirdparty',
ignore_warnings=True)
# Eclipse generates org.mozilla.gecko.R for this project, which is referenced by
# all the Java code. The reason that this is not generated in the main Fennec
# project is that you cannot specify a custom package to the Eclipse Android
# builder; that is, the Eclipse Android builder always builds the
# org.mozilla.fennec_*.R class. This approach works because Eclipse shares
# resources and some code across projects implicitly, which lets us provide
# org.mozilla.gecko.R to the main Fennec project from the FennecResources
# project.
#
# Previously, the static resources were in the FennecResources project. To let
# the FennecResources Eclipse project produce org.mozilla.gecko.R, however, the
# project must depend on all the resource projects. But the crash reporter
# resources depend on some of the static resources, and that causes a cycle.
# This layer of indirection lets us break the cycle.
resources = add_android_eclipse_library_project('FennecResources')
resources.package_name = 'org.mozilla.gecko'
resources.res = None
resources.included_projects += ['../' + static.name, '../' + generated.name, '../' + branding.name]
resources.recursive_make_targets += generated_recursive_make_targets
# The resources are included in the Fennec APK.
main.included_projects += ['../' + resources.name]
omnijar = add_android_eclipse_library_project('FennecOmnijar')
omnijar.package_name = 'org.mozilla.gecko.omnijar'
# This is delicate. We write into OBJDIR, and write triggers a new build of the
# Fennec project, because the omni.ja timestamp is always updated. (The target
# is FORCE and the installer does not track dependencies.) However, Eclipse only
# triggers a new build (of FennecOmnijar) when something actually changes, so
# we're not constantly rebuilding the FennecOmnijar (or Fennec) project.
omnijar.recursive_make_targets += [TOPOBJDIR + '/dist/fennec/assets/omni.ja']
for d in ['app', 'chrome', 'components', 'locales', 'modules', 'themes']:
omnijar.add_classpathentry(d, TOPSRCDIR + '/mobile/android/' + d, dstdir=d)
# The omnijar is included in the Fennec APK (although it's empty,
# having no resources, assets, or Java code).
main.included_projects += ['../' + omnijar.name]
if CONFIG['MOZ_CRASHREPORTER']:
crashreporter = add_android_eclipse_library_project('FennecResourcesCrashReporter')
crashreporter.package_name = 'org.mozilla.gecko.crashreporter'
crashreporter.res = SRCDIR + '/crashreporter/res'
crashreporter.recursive_make_targets += generated_recursive_make_targets
# layout/crash_reporter.xml references strings and other resources, and
# therefore depends on other resource projects.
crashreporter.included_projects += ['../' + static.name, '../' + generated.name]
crashreporter.referenced_projects += ['../' + static.name, '../' + generated.name]
resources.included_projects += ['../' + crashreporter.name]
resources.referenced_projects += ['../' + crashreporter.name]
if CONFIG['MOZ_ANDROID_MLS_STUMBLER']:
main.included_projects += ['../FennecStumbler']
main.referenced_projects += ['../FennecStumbler']
DEFINES['MOZ_STUMBLER_API_KEY'] = CONFIG['MOZ_MOZILLA_API_KEY']
if CONFIG['MOZ_ANDROID_SEARCH_ACTIVITY']:
# The Search Activity code is built as part of Fennec, so we follow suit in Eclipse.
main.add_classpathentry('search', TOPSRCDIR + '/mobile/android/search/java', dstdir='search')