# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
android_library("java") {
sources = [
"java/src/org/chromium/components/messages/MessageAnimationCoordinator.java",
"java/src/org/chromium/components/messages/MessageAutoDismissTimer.java",
"java/src/org/chromium/components/messages/MessageBannerCoordinator.java",
"java/src/org/chromium/components/messages/MessageBannerMediator.java",
"java/src/org/chromium/components/messages/MessageBannerView.java",
"java/src/org/chromium/components/messages/MessageBannerViewBinder.java",
"java/src/org/chromium/components/messages/MessageDimens.java",
"java/src/org/chromium/components/messages/MessageDispatcherImpl.java",
"java/src/org/chromium/components/messages/MessageQueueManager.java",
"java/src/org/chromium/components/messages/MessageScopeChange.java",
"java/src/org/chromium/components/messages/MessageStateHandler.java",
"java/src/org/chromium/components/messages/MessagesFactory.java",
"java/src/org/chromium/components/messages/ScopeChangeController.java",
"java/src/org/chromium/components/messages/ScopeKey.java",
"java/src/org/chromium/components/messages/SingleActionMessage.java",
"java/src/org/chromium/components/messages/SwipeAnimationHandler.java",
]
resources_package = "org.chromium.components.messages"
deps = [
":java_resources",
"..:java",
"..:java_resources",
"..:manager_java",
"//base:base_java",
"//build/android:build_java",
"//components/browser_ui/styles/android:java",
"//components/browser_ui/widget/android:java",
"//content/public/android:content_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_appcompat_appcompat_resources_java",
"//third_party/androidx:androidx_core_core_java",
"//third_party/androidx:androidx_interpolator_interpolator_java",
"//third_party/androidx:androidx_swiperefreshlayout_swiperefreshlayout_java",
"//ui/android:ui_full_java",
"//url:gurl_java",
]
}
robolectric_library("junit") {
resources_package = "org.chromium.components.messages"
sources = [
"java/src/org/chromium/components/messages/MessageAnimationCoordinatorUnitTest.java",
"java/src/org/chromium/components/messages/MessageAutoDismissTimerTest.java",
"java/src/org/chromium/components/messages/MessageBannerCoordinatorUnitTest.java",
"java/src/org/chromium/components/messages/MessageBannerMediatorUnitTest.java",
"java/src/org/chromium/components/messages/MessageDispatcherUnitTest.java",
"java/src/org/chromium/components/messages/MessageQueueManagerTest.java",
"java/src/org/chromium/components/messages/ScopeChangeControllerTest.java",
]
deps = [
":java",
":java_resources",
"..:java",
"..:java_resources",
"..:manager_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//components/browser_ui/widget/android:java",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_java",
"//url:gurl_java",
"//url:gurl_junit_test_support",
]
}
android_library("unit_device_javatests") {
resources_package = "org.chromium.components.messages"
testonly = true
sources = [
"java/src/org/chromium/components/messages/MessageBannerRenderTest.java",
"java/src/org/chromium/components/messages/MessageBannerViewTest.java",
"java/src/org/chromium/components/messages/SingleActionMessageTest.java",
]
deps = [
":java",
":java_resources",
"..:java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_java_test_support_uncommon",
"//components/browser_ui/test/android:test_support_java",
"//components/browser_ui/widget/android:java",
"//content/public/test/android:content_java_test_support",
"//third_party/android_deps:espresso_java",
"//third_party/androidx:androidx_swiperefreshlayout_swiperefreshlayout_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/hamcrest:hamcrest_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_java",
"//ui/android:ui_java_test_support",
]
}
android_resources("java_resources") {
sources = [
"java/res/drawable-v23/message_bg_tinted.xml",
"java/res/drawable-v31/message_bg_tinted.xml",
"java/res/layout/message_banner_view.xml",
"java/res/values-night/dimens.xml",
"java/res/values/dimens.xml",
]
deps = [
"//components/browser_ui/strings/android:browser_ui_strings_grd",
"//components/browser_ui/styles/android:java_resources",
"//ui/android:ui_java_resources",
]
}