blob: d3d13110674accbd824ea46d30f246cf3df8ae87 [file] [log] [blame]
# Copyright 2021 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//chrome/android/features/android_library_factory_tmpl.gni")
import("//chrome/browser/buildflags.gni")
android_library("java") {
sources = [
"java/src/org/chromium/chrome/browser/feed/BackToTopBubble.java",
"java/src/org/chromium/chrome/browser/feed/BackToTopBubbleScrollListener.java",
"java/src/org/chromium/chrome/browser/feed/CardMenuBottomSheetContent.java",
"java/src/org/chromium/chrome/browser/feed/FeedActionDelegate.java",
"java/src/org/chromium/chrome/browser/feed/FeedAutoplaySettingsDelegate.java",
"java/src/org/chromium/chrome/browser/feed/FeedBubbleDelegate.java",
"java/src/org/chromium/chrome/browser/feed/FeedFeatures.java",
"java/src/org/chromium/chrome/browser/feed/FeedImageFetchClient.java",
"java/src/org/chromium/chrome/browser/feed/FeedLaunchReliabilityLoggingState.java",
"java/src/org/chromium/chrome/browser/feed/FeedLoggingParameters.java",
"java/src/org/chromium/chrome/browser/feed/FeedPersistentKeyValueCache.java",
"java/src/org/chromium/chrome/browser/feed/FeedPlaceholderLayout.java",
"java/src/org/chromium/chrome/browser/feed/FeedProcessScopeDependencyProvider.java",
"java/src/org/chromium/chrome/browser/feed/FeedReliabilityLoggingBridge.java",
"java/src/org/chromium/chrome/browser/feed/FeedScrollState.java",
"java/src/org/chromium/chrome/browser/feed/FeedServiceBridge.java",
"java/src/org/chromium/chrome/browser/feed/FeedSliceViewTracker.java",
"java/src/org/chromium/chrome/browser/feed/FeedStream.java",
"java/src/org/chromium/chrome/browser/feed/FeedStreamViewResizer.java",
"java/src/org/chromium/chrome/browser/feed/FeedSurfaceDelegate.java",
"java/src/org/chromium/chrome/browser/feed/FeedSurfaceLifecycleManager.java",
"java/src/org/chromium/chrome/browser/feed/FeedSurfaceProvider.java",
"java/src/org/chromium/chrome/browser/feed/FeedSurfaceScopeDependencyProvider.java",
"java/src/org/chromium/chrome/browser/feed/FeedSurfaceScrollDelegate.java",
"java/src/org/chromium/chrome/browser/feed/FeedSurfaceTracker.java",
"java/src/org/chromium/chrome/browser/feed/FeedSwipeRefreshLayout.java",
"java/src/org/chromium/chrome/browser/feed/FeedUma.java",
"java/src/org/chromium/chrome/browser/feed/HeaderIphScrollListener.java",
"java/src/org/chromium/chrome/browser/feed/NativeViewListRenderer.java",
"java/src/org/chromium/chrome/browser/feed/NtpListContentManager.java",
"java/src/org/chromium/chrome/browser/feed/RefreshIphScrollListener.java",
"java/src/org/chromium/chrome/browser/feed/ScrollListener.java",
"java/src/org/chromium/chrome/browser/feed/ScrollTracker.java",
"java/src/org/chromium/chrome/browser/feed/ScrollableContainerDelegate.java",
"java/src/org/chromium/chrome/browser/feed/SnapScrollHelper.java",
"java/src/org/chromium/chrome/browser/feed/Stream.java",
"java/src/org/chromium/chrome/browser/feed/VideoPreviewsType.java",
"java/src/org/chromium/chrome/browser/feed/componentinterfaces/SurfaceCoordinator.java",
"java/src/org/chromium/chrome/browser/feed/feedmanagement/FeedManagementCoordinator.java",
"java/src/org/chromium/chrome/browser/feed/feedmanagement/FeedManagementItemProperties.java",
"java/src/org/chromium/chrome/browser/feed/feedmanagement/FeedManagementItemView.java",
"java/src/org/chromium/chrome/browser/feed/feedmanagement/FeedManagementItemViewBinder.java",
"java/src/org/chromium/chrome/browser/feed/feedmanagement/FeedManagementMediator.java",
"java/src/org/chromium/chrome/browser/feed/followmanagement/FollowManagementCoordinator.java",
"java/src/org/chromium/chrome/browser/feed/followmanagement/FollowManagementItemProperties.java",
"java/src/org/chromium/chrome/browser/feed/followmanagement/FollowManagementItemView.java",
"java/src/org/chromium/chrome/browser/feed/followmanagement/FollowManagementItemViewBinder.java",
"java/src/org/chromium/chrome/browser/feed/followmanagement/FollowManagementMediator.java",
"java/src/org/chromium/chrome/browser/feed/hooks/FeedHooks.java",
"java/src/org/chromium/chrome/browser/feed/hooks/FeedHooksImpl.java",
"java/src/org/chromium/chrome/browser/feed/sections/OnSectionHeaderSelectedListener.java",
"java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderListProperties.java",
"java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderProperties.java",
"java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java",
"java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderViewBinder.java",
"java/src/org/chromium/chrome/browser/feed/sections/SectionType.java",
"java/src/org/chromium/chrome/browser/feed/sections/ViewVisibility.java",
"java/src/org/chromium/chrome/browser/feed/settings/FeedAutoplaySettingsFragment.java",
"java/src/org/chromium/chrome/browser/feed/settings/RadioButtonGroupVideoPreviewsPreference.java",
"java/src/org/chromium/chrome/browser/feed/sort_ui/SortChipProperties.java",
"java/src/org/chromium/chrome/browser/feed/sort_ui/SortView.java",
"java/src/org/chromium/chrome/browser/feed/sort_ui/SortViewBinder.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/ShadowedClickableTextBubble.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedBridge.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedDialogContents.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedDialogCoordinator.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedDialogMediator.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedDialogProperties.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedDialogViewBinder.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedFaviconFetcher.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedFollowIntroController.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedFollowIntroView.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedMainMenuItem.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedSnackbarController.java",
]
deps = [
":feed_java_resources",
"//base:base_java",
"//chrome/android:base_module_java",
"//chrome/browser/browser_controls/android:java",
"//chrome/browser/feature_engagement:java",
"//chrome/browser/feedback/android:java",
"//chrome/browser/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/privacy:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/share:java",
"//chrome/browser/signin/services/android:java",
"//chrome/browser/tab:java",
"//chrome/browser/ui/android/appmenu:java",
"//chrome/browser/ui/android/native_page:java",
"//chrome/browser/ui/android/toolbar:java",
"//chrome/browser/ui/android/toolbar:java_resources",
"//chrome/browser/ui/messages/android:java",
"//chrome/browser/user_education:java",
"//chrome/browser/util:java",
"//chrome/browser/xsurface:java",
"//components/browser_ui/bottomsheet/android:java",
"//components/browser_ui/settings/android:java",
"//components/browser_ui/share/android:java",
"//components/browser_ui/styles/android:java",
"//components/browser_ui/util/android:java",
"//components/browser_ui/widget/android:java",
"//components/favicon/android:java",
"//components/feature_engagement:feature_engagement_java",
"//components/feed/core/proto:proto_java_v2",
"//components/feed/core/v2:feedv2_core_java",
"//components/image_fetcher:java",
"//components/prefs/android:java",
"//components/signin/public/android:java",
"//components/url_formatter/android:url_formatter_java",
"//components/user_prefs/android:java",
"//components/version_info/android:version_constants_java",
"//content/public/android:content_full_java",
"//content/public/android:content_main_dex_java",
"//third_party/android_deps:material_design_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/android_swipe_refresh:android_swipe_refresh_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_appcompat_appcompat_java",
"//third_party/androidx:androidx_appcompat_appcompat_resources_java",
"//third_party/androidx:androidx_browser_browser_java",
"//third_party/androidx:androidx_core_core_java",
"//third_party/androidx:androidx_preference_preference_java",
"//third_party/androidx:androidx_recyclerview_recyclerview_java",
"//ui/android:ui_no_recycler_view_java",
"//ui/android:ui_recycler_view_java",
"//ui/android:ui_utils_java",
"//ui/base/mojom:mojom_java",
"//url:gurl_java",
]
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
resources_package = "org.chromium.chrome.browser.feed"
# Add the actual implementation where necessary so that downstream targets
# can provide their own implementations.
jar_excluded_patterns = [ "*/FeedHooksImpl*.class" ]
}
android_library("hooks_public_impl_java") {
sources =
[ "java/src/org/chromium/chrome/browser/feed/hooks/FeedHooksImpl.java" ]
deps = [ ":java" ]
}
android_resources("feed_java_resources") {
sources = [
"java/res/color/chip_hairline_color.xml",
"java/res/color/menu_footer_chip_background.xml",
"java/res/drawable-hdpi/follow_accelerator_shadow.9.png",
"java/res/drawable-mdpi/follow_accelerator_shadow.9.png",
"java/res/drawable-xhdpi/follow_accelerator_shadow.9.png",
"java/res/drawable-xxhdpi/follow_accelerator_shadow.9.png",
"java/res/drawable/back_to_top_arrow.xml",
"java/res/drawable/feed_header_border_background.xml",
"java/res/drawable/rounded_corners.xml",
"java/res/drawable/web_feed_post_follow_illustration.xml",
"java/res/layout/back_to_top_bubble.xml",
"java/res/layout/feed_management_activity.xml",
"java/res/layout/feed_management_list_item.xml",
"java/res/layout/feed_options_panel.xml",
"java/res/layout/feed_placeholder_layout.xml",
"java/res/layout/feed_spinner.xml",
"java/res/layout/follow_management_activity.xml",
"java/res/layout/follow_management_empty_state.xml",
"java/res/layout/follow_management_item.xml",
"java/res/layout/follow_management_loading_state.xml",
"java/res/layout/following_empty_state.xml",
"java/res/layout/new_tab_page_feed_v2_expandable_header.xml",
"java/res/layout/new_tab_page_multi_feed_header.xml",
"java/res/layout/new_tab_page_section_tab.xml",
"java/res/layout/no_connection.xml",
"java/res/layout/no_content_v2.xml",
"java/res/layout/radio_button_group_video_previews_preference.xml",
"java/res/layout/web_feed_dialog.xml",
"java/res/layout/web_feed_main_menu_item.xml",
"java/res/values-night/colors.xml",
"java/res/values/attrs.xml",
"java/res/values/colors.xml",
"java/res/values/dimens.xml",
"java/res/values/drawables.xml",
"java/res/values/styles.xml",
"java/res/xml/feed_autoplay_preferences.xml",
"java/res/xml/tab_layout_badge.xml",
]
deps = [
"//chrome/browser/ui/android/strings:ui_strings_grd",
"//chrome/browser/user_education:java_resources",
"//components/browser_ui/styles/android:java_resources",
"//components/browser_ui/widget/android:java_resources",
]
}
generate_jni("jni_headers") {
sources = [
"java/src/org/chromium/chrome/browser/feed/FeedImageFetchClient.java",
"java/src/org/chromium/chrome/browser/feed/FeedPersistentKeyValueCache.java",
"java/src/org/chromium/chrome/browser/feed/FeedProcessScopeDependencyProvider.java",
"java/src/org/chromium/chrome/browser/feed/FeedReliabilityLoggingBridge.java",
"java/src/org/chromium/chrome/browser/feed/FeedServiceBridge.java",
"java/src/org/chromium/chrome/browser/feed/FeedStream.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedBridge.java",
]
}
android_library("javatests") {
testonly = true
sources = [
"java/src/org/chromium/chrome/browser/feed/BackToTopBubbleScrollListenerTest.java",
"java/src/org/chromium/chrome/browser/feed/FeedProcessScopeDependencyProviderNativeTest.java",
"java/src/org/chromium/chrome/browser/feed/HeaderIphScrollListenerTest.java",
"java/src/org/chromium/chrome/browser/feed/RefreshIphScrollListenerTest.java",
"java/src/org/chromium/chrome/browser/feed/settings/FeedAutoplaySettingsFragmentTest.java",
]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/browser/feature_engagement:java",
"//chrome/browser/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/settings:test_support_java",
"//chrome/browser/tab:java",
"//chrome/browser/ui/android/appmenu:java",
"//chrome/browser/ui/messages/android:java",
"//chrome/browser/xsurface:java",
"//chrome/test/android:chrome_java_test_support",
"//components/browser_ui/settings/android:java",
"//components/browser_ui/widget/android:java",
"//components/favicon/android:java",
"//components/feature_engagement:feature_engagement_java",
"//components/feed/core/v2:feedv2_core_java",
"//components/prefs/android:java",
"//components/url_formatter/android:url_formatter_java",
"//components/user_prefs/android:java",
"//content/public/android:content_full_java",
"//content/public/test/android:content_java_test_support",
"//third_party/android_deps:espresso_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/androidx:androidx_preference_preference_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/hamcrest:hamcrest_library_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_java_test_support",
"//ui/android:ui_no_recycler_view_java",
"//ui/base/mojom:mojom_java",
"//url:gurl_java",
]
}
android_library("junit") {
testonly = true
# Skip platform checks since Robolectric depends on requires_android targets.
bypass_platform_checks = true
sources = [
"java/src/org/chromium/chrome/browser/feed/FakeLinearLayoutManager.java",
"java/src/org/chromium/chrome/browser/feed/FeedFeaturesTest.java",
"java/src/org/chromium/chrome/browser/feed/FeedLoggingParametersTest.java",
"java/src/org/chromium/chrome/browser/feed/FeedPlaceholderLayoutTest.java",
"java/src/org/chromium/chrome/browser/feed/FeedProcessScopeDependencyProviderTest.java",
"java/src/org/chromium/chrome/browser/feed/FeedSliceViewTrackerTest.java",
"java/src/org/chromium/chrome/browser/feed/FeedStreamTest.java",
"java/src/org/chromium/chrome/browser/feed/NativeViewListRendererTest.java",
"java/src/org/chromium/chrome/browser/feed/NtpListContentManagerTest.java",
"java/src/org/chromium/chrome/browser/feed/ScrollTrackerTest.java",
"java/src/org/chromium/chrome/browser/feed/feedmanagement/FeedManagementCoordinatorTest.java",
"java/src/org/chromium/chrome/browser/feed/feedmanagement/FeedManagementMediatorTest.java",
"java/src/org/chromium/chrome/browser/feed/followmanagement/FollowManagementCoordinatorTest.java",
"java/src/org/chromium/chrome/browser/feed/followmanagement/FollowManagementMediatorTest.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/TestWebFeedFaviconFetcher.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedDialogMediatorTest.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedFaviconFetcherTest.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedFollowIntroControllerTest.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedFollowIntroViewTest.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedMainMenuItemTest.java",
"java/src/org/chromium/chrome/browser/feed/webfeed/WebFeedSnackbarControllerTest.java",
]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//chrome/android:chrome_java",
"//chrome/browser/feature_engagement:java",
"//chrome/browser/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/privacy:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/settings:test_support_java",
"//chrome/browser/tab:java",
"//chrome/browser/ui/android/appmenu:java",
"//chrome/browser/ui/messages/android:java",
"//chrome/browser/user_education:java",
"//chrome/browser/xsurface:java",
"//chrome/test/android:chrome_java_test_support",
"//components/browser_ui/bottomsheet/android:java",
"//components/browser_ui/settings/android:java",
"//components/browser_ui/widget/android:java",
"//components/embedder_support/android:junit_test_support",
"//components/favicon/android:java",
"//components/feature_engagement:feature_engagement_java",
"//components/feed/core/proto:proto_java_v2",
"//components/feed/core/v2:feedv2_core_java",
"//components/image_fetcher:java",
"//components/prefs/android:java",
"//components/url_formatter/android:url_formatter_java",
"//components/user_prefs/android:java",
"//content/public/android:content_full_java",
"//content/public/test/android:content_java_test_support",
"//third_party/android_deps:espresso_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/android_deps:robolectric_all_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/androidx:androidx_appcompat_appcompat_java",
"//third_party/androidx:androidx_appcompat_appcompat_resources_java",
"//third_party/androidx:androidx_lifecycle_lifecycle_common_java",
"//third_party/androidx:androidx_recyclerview_recyclerview_java",
"//third_party/androidx:androidx_test_core_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/gif_player:gif_player_java",
"//third_party/hamcrest:hamcrest_core_java",
"//third_party/hamcrest:hamcrest_library_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_java_test_support",
"//ui/android:ui_no_recycler_view_java",
"//ui/android:ui_recycler_view_java",
"//ui/base/mojom:mojom_java",
"//url:gurl_java",
"//url:gurl_junit_shadows",
"//url:gurl_junit_test_support",
]
}