# 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/browser_ui/util/AutomotiveUtils.java",
"java/src/org/chromium/components/browser_ui/util/AvatarGenerator.java",
"java/src/org/chromium/components/browser_ui/util/BitmapCache.java",
"java/src/org/chromium/components/browser_ui/util/BrowserControlsVisibilityDelegate.java",
"java/src/org/chromium/components/browser_ui/util/BrowserUiUtilsCachedFlags.java",
"java/src/org/chromium/components/browser_ui/util/ComposedBrowserControlsVisibilityDelegate.java",
"java/src/org/chromium/components/browser_ui/util/ConversionUtils.java",
"java/src/org/chromium/components/browser_ui/util/DimensionCompat.java",
"java/src/org/chromium/components/browser_ui/util/DownloadUtils.java",
"java/src/org/chromium/components/browser_ui/util/FirstDrawDetector.java",
"java/src/org/chromium/components/browser_ui/util/GlobalDiscardableReferencePool.java",
"java/src/org/chromium/components/browser_ui/util/ToolbarUtils.java",
"java/src/org/chromium/components/browser_ui/util/TraceEventVectorDrawableCompat.java",
"java/src/org/chromium/components/browser_ui/util/date/CalendarFactory.java",
"java/src/org/chromium/components/browser_ui/util/date/CalendarUtils.java",
"java/src/org/chromium/components/browser_ui/util/date/StringUtils.java",
]
deps = [
":java_resources",
"//base:base_java",
"//build/android:build_java",
"//cc:cc_java",
"//components/browser_ui/widget/android:java_resources",
"//components/embedder_support/android:util_java",
"//components/url_formatter/android:url_formatter_java",
"//content/public/android:content_main_dex_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_appcompat_appcompat_java",
"//third_party/androidx:androidx_collection_collection_java",
"//third_party/androidx:androidx_core_core_java",
"//third_party/androidx:androidx_vectordrawable_vectordrawable_java",
"//ui/android:ui_java",
"//url:gurl_java",
]
resources_package = "org.chromium.components.browser_ui.util"
}
android_resources("java_resources") {
sources = []
deps = [ "//components/browser_ui/strings/android:browser_ui_strings_grd" ]
}
static_library("android") {
sources = [
"url_constants.cc",
"url_constants.h",
]
}
robolectric_library("junit") {
sources = [
"java/src/org/chromium/components/browser_ui/util/BitmapCacheTest.java",
"java/src/org/chromium/components/browser_ui/util/ComposedBrowserControlsVisibilityDelegateTest.java",
"java/src/org/chromium/components/browser_ui/util/DimensionCompatUnitTest.java",
]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//base/test:test_support_java",
"//cc:cc_java",
"//content/public/android:content_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
]
}
android_library("unit_device_javatests") {
testonly = true
sources = [
"java/src/org/chromium/components/browser_ui/util/AvatarGeneratorTest.java",
"java/src/org/chromium/components/browser_ui/util/FirstDrawDetectorTest.java",
]
deps = [
"//base:base_java",
"//base:base_java_test_support",
"//components/browser_ui/util/android:java",
"//content/public/test/android:content_java_test_support",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/junit",
"//ui/android:ui_java_test_support",
]
resources_package = "org.chromium.components.browser_ui.util"
}