# -*- 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'] include('android-services.mozbuild') thirdparty_source_dir = TOPSRCDIR + '/mobile/android/thirdparty/' mgjar = add_java_jar('gecko-mozglue') mgjar.sources += [ 'mozglue/ByteBufferInputStream.java', 'mozglue/DirectBufferAllocator.java', 'mozglue/generatorannotations/GeneratorOptions.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 += [ 'org/mozilla/gecko/mozglue/GeckoLoader.java', ] mgjar.javac_flags += ['-Xlint:all'] wsjar = add_java_jar('websockets') wsjar.sources += [ thirdparty_source_dir + f for f in [ 'com/codebutler/android_websockets/HybiParser.java', 'com/codebutler/android_websockets/WebSocketClient.java', ] ] wsjar.javac_flags += ['-Xlint:all,-serial'] gujar = add_java_jar('gecko-util') gujar.sources += [ 'util/ActivityResultHandler.java', 'util/ActivityResultHandlerMap.java', 'util/Clipboard.java', 'util/EventDispatcher.java', 'util/FloatUtils.java', 'util/GamepadUtils.java', 'util/GeckoBackgroundThread.java', 'util/GeckoEventListener.java', 'util/GeckoEventResponder.java', 'util/GeckoJarReader.java', 'util/HardwareUtils.java', 'util/INIParser.java', 'util/INISection.java', 'util/JSONUtils.java', 'util/NonEvictingLruCache.java', 'util/ProxySelector.java', 'util/StringUtils.java', 'util/ThreadUtils.java', 'util/UiAsyncTask.java', ] gujar.extra_jars = [ '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/' 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', ] wrjar.sources += [ audio_root + 'AudioManagerAndroid.java', audio_root + 'WebRTCAudioDevice.java', ] wrjar.extra_jars = [ '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', 'animation/AnimationUtils.java', 'animation/AnimatorProxy.java', 'animation/HeightChangeAnimation.java', 'animation/PropertyAnimator.java', 'animation/Rotate3DAnimation.java', 'animation/ViewHelper.java', 'ANRReporter.java', 'AppNotificationClient.java', 'BaseGeckoInterface.java', 'BrowserApp.java', 'CameraImageResultHandler.java', 'CameraVideoResultHandler.java', 'ContactService.java', 'ContextGetter.java', 'CustomEditText.java', 'DataReportingNotification.java', 'db/BrowserContract.java', 'db/BrowserDB.java', 'db/BrowserProvider.java', 'db/DBUtils.java', 'db/FormHistoryProvider.java', 'db/HomeListsDatabaseHelper.java', 'db/HomeListsProvider.java', 'db/LocalBrowserDB.java', 'db/PasswordsProvider.java', 'db/PerProfileDatabases.java', 'db/SQLiteBridgeContentProvider.java', 'db/TabsProvider.java', 'Distribution.java', 'DoorHangerPopup.java', 'EditBookmarkDialog.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', 'FilePickerResultHandler.java', 'FilePickerResultHandlerSync.java', 'FindInPageBar.java', 'FirefoxAccountsHelper.java', 'FormAssistPopup.java', 'GeckoAccessibility.java', 'GeckoActivity.java', 'GeckoActivityStatus.java', 'GeckoApp.java', 'GeckoApplication.java', 'GeckoAppShell.java', 'GeckoBatteryManager.java', 'GeckoConnectivityReceiver.java', 'GeckoEditable.java', 'GeckoEvent.java', 'GeckoHalDefines.java', 'GeckoInputConnection.java', 'GeckoJavaSampler.java', 'GeckoMessageReceiver.java', 'GeckoNetworkManager.java', 'GeckoProfile.java', 'GeckoScreenOrientationListener.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/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/NinePatchTileLayer.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/SingleTileLayer.java', 'gfx/SubdocumentScrollHelper.java', 'gfx/TextLayer.java', 'gfx/TextureGenerator.java', 'gfx/TextureReaper.java', 'gfx/TileLayer.java', 'gfx/TouchEventHandler.java', 'gfx/ViewTransform.java', 'gfx/VirtualLayer.java', 'GlobalHistory.java', 'health/BrowserHealthRecorder.java', 'health/BrowserHealthReporter.java', 'home/BookmarkFolderView.java', 'home/BookmarksListAdapter.java', 'home/BookmarksListView.java', 'home/BookmarksPanel.java', 'home/BrowserSearch.java', 'home/DynamicPanel.java', 'home/FadedTextView.java', 'home/HistoryPanel.java', 'home/HomeAdapter.java', 'home/HomeBanner.java', 'home/HomeConfig.java', 'home/HomeConfigLoader.java', 'home/HomeConfigPrefsBackend.java', 'home/HomeFragment.java', 'home/HomeListView.java', 'home/HomePager.java', 'home/HomePagerTabStrip.java', 'home/LastTabsPanel.java', 'home/MostRecentPanel.java', 'home/MultiTypeCursorAdapter.java', 'home/PanelManager.java', 'home/PinSiteDialog.java', 'home/ReadingListPanel.java', 'home/SearchEngine.java', 'home/SearchEngineRow.java', 'home/SearchLoader.java', 'home/SimpleCursorLoader.java', 'home/SuggestClient.java', 'home/TabMenuStrip.java', 'home/TopSitesGridItemView.java', 'home/TopSitesGridView.java', 'home/TopSitesPanel.java', 'home/TopSitesThumbnailView.java', 'home/TwoLinePageRow.java', 'InputMethods.java', 'JavaAddonManager.java', 'LightweightTheme.java', 'LightweightThemeDrawable.java', 'LocaleManager.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', 'NotificationClient.java', 'NotificationHandler.java', 'NotificationHelper.java', 'NotificationService.java', 'NSSBridge.java', 'OrderedBroadcastHelper.java', 'preferences/AlignRightLinkPreference.java', 'preferences/AndroidImport.java', 'preferences/AndroidImportPreference.java', 'preferences/FontSizePreference.java', 'preferences/GeckoPreferenceFragment.java', 'preferences/GeckoPreferences.java', 'preferences/LinkPreference.java', 'preferences/MultiChoicePreference.java', 'preferences/PrivateDataPreference.java', 'preferences/SearchEnginePreference.java', 'preferences/SearchPreferenceCategory.java', 'preferences/SyncPreference.java', 'PrefsHelper.java', 'PrivateTab.java', 'prompts/ColorPickerInput.java', 'prompts/IconGridInput.java', 'prompts/Prompt.java', 'prompts/PromptInput.java', 'prompts/PromptService.java', 'ReaderModeUtils.java', 'ReferrerReceiver.java', 'RemoteTabs.java', 'Restarter.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', 'SurfaceBits.java', 'Tab.java', 'Tabs.java', 'TabsAccessor.java', 'TabsPanel.java', 'TabsTray.java', 'Telemetry.java', 'TextSelection.java', 'TextSelectionHandle.java', 'ThumbnailHelper.java', 'toolbar/AutocompleteHandler.java', 'toolbar/BackButton.java', 'toolbar/BrowserToolbar.java', 'toolbar/CanvasDelegate.java', 'toolbar/ForwardButton.java', 'toolbar/PageActionLayout.java', 'toolbar/ShapedButton.java', 'toolbar/SiteIdentityPopup.java', 'toolbar/TabCounter.java', 'toolbar/ToolbarDisplayLayout.java', 'toolbar/ToolbarEditLayout.java', 'toolbar/ToolbarEditText.java', 'toolbar/ToolbarProgressView.java', 'toolbar/ToolbarTitlePrefs.java', 'TouchEventInterceptor.java', 'updater/UpdateService.java', 'updater/UpdateServiceHelper.java', 'VideoPlayer.java', 'webapp/ApkResources.java', 'webapp/InstallHelper.java', 'webapp/InstallListener.java', 'webapp/UninstallListener.java', 'webapp/WebAppAllocator.java', 'webapp/WebAppDispatcher.java', 'webapp/WebAppImpl.java', 'WebAppAllocator.java', 'WebAppImpl.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/FaviconView.java', 'widget/FlowLayout.java', 'widget/GeckoActionProvider.java', 'widget/GeckoPopupMenu.java', 'widget/IconTabWidget.java', 'widget/TabRow.java', 'widget/ThumbnailView.java', 'widget/TwoWayView.java', 'ZoomConstraints.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('.', '/') # All generated sources are handled specially in Makefile.in. And # R.java is handled even more specially than the others! gbjar.generated_sources += [ android_package_dir + f for f in [ '/App.java', '/WebApp.java', '/WebApps.java', ] ] gbjar.generated_sources += [ 'org/mozilla/gecko/AppConstants.java', 'org/mozilla/gecko/R.java', 'org/mozilla/gecko/SysInfo.java', 'org/mozilla/gecko/widget/GeckoEditText.java', 'org/mozilla/gecko/widget/GeckoImageButton.java', 'org/mozilla/gecko/widget/GeckoImageView.java', 'org/mozilla/gecko/widget/GeckoLinearLayout.java', 'org/mozilla/gecko/widget/GeckoRelativeLayout.java', 'org/mozilla/gecko/widget/GeckoTextSwitcher.java', 'org/mozilla/gecko/widget/GeckoTextView.java', ] if CONFIG['MOZ_CRASHREPORTER']: gbjar.sources += [ 'CrashReporter.java' ] ANDROID_RES_DIRS += [ SRCDIR + '/crashreporter/res' ] gbjar.sources += sync_java_files gbjar.generated_sources += sync_generated_java_files gbjar.extra_jars = [ 'gecko-mozglue.jar', 'gecko-util.jar', 'sync-thirdparty.jar', 'websockets.jar', ] gbjar.javac_flags += ['-Xlint:all,-deprecation,-fallthrough'] ANDROID_RES_DIRS += [ SRCDIR + '/resources', TOPSRCDIR + '/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res', OBJDIR + '/res', ] ANDROID_GENERATED_RESFILES += [ 'res/values/strings.xml', ] for var in ('MOZ_ANDROID_ANR_REPORTER', 'MOZ_LINKER_EXTRACT'): 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', 'MOZILLA_OFFICIAL', '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