chromium/chrome/browser/quick_delete/BUILD.gn

# Copyright 2023 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")
import("//third_party/jni_zero/jni_zero.gni")

android_library("java") {
  srcjar_deps = [ ":jni_headers" ]
  sources = [
    "android/java/src/org/chromium/chrome/browser/quick_delete/QuickDeleteAnimationGradientDrawable.java",
    "android/java/src/org/chromium/chrome/browser/quick_delete/QuickDeleteBridge.java",
    "android/java/src/org/chromium/chrome/browser/quick_delete/QuickDeleteController.java",
    "android/java/src/org/chromium/chrome/browser/quick_delete/QuickDeleteDelegate.java",
    "android/java/src/org/chromium/chrome/browser/quick_delete/QuickDeleteDialogDelegate.java",
    "android/java/src/org/chromium/chrome/browser/quick_delete/QuickDeleteMediator.java",
    "android/java/src/org/chromium/chrome/browser/quick_delete/QuickDeleteMetricsDelegate.java",
    "android/java/src/org/chromium/chrome/browser/quick_delete/QuickDeleteProperties.java",
    "android/java/src/org/chromium/chrome/browser/quick_delete/QuickDeleteTabsFilter.java",
    "android/java/src/org/chromium/chrome/browser/quick_delete/QuickDeleteViewBinder.java",
  ]
  deps = [
    ":java_resources",
    "//base:base_java",
    "//build/android:build_java",
    "//chrome/browser/browsing_data/android:java",
    "//chrome/browser/feature_engagement:java",
    "//chrome/browser/flags:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/settings:factory_java",
    "//chrome/browser/signin/services/android:java",
    "//chrome/browser/sync/android:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/tab_group:java",
    "//chrome/browser/tab_ui/android:java",
    "//chrome/browser/tabmodel:java",
    "//chrome/browser/ui/android/layouts:java",
    "//chrome/browser/ui/android/night_mode:java",
    "//chrome/browser/ui/messages/android:java",
    "//components/browser_ui/settings/android:java",
    "//components/browser_ui/styles/android:java",
    "//components/browser_ui/theme/android:java_resources",
    "//components/browser_ui/widget/android:java",
    "//components/browsing_data/core:java",
    "//components/embedder_support/android:util_java",
    "//components/feature_engagement/public:public_java",
    "//components/signin/public/android:java",
    "//components/sync/android:sync_java",
    "//content/public/android:content_full_java",
    "//third_party/android_deps:material_design_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_annotation_annotation_jvm_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/jni_zero:jni_zero_java",
    "//ui/android:ui_no_recycler_view_java",
  ]

  resources_package = "org.chromium.chrome.browser.quick_delete"
}

generate_jni("jni_headers") {
  sources = [ "android/java/src/org/chromium/chrome/browser/quick_delete/QuickDeleteBridge.java" ]
}

android_resources("java_resources") {
  sources = [
    "android/java/res/drawable/quick_delete_cookies_40dp.xml",
    "android/java/res/drawable/quick_delete_dialog_history_icon_40dp.xml",
    "android/java/res/drawable/quick_delete_dialog_tab_icon_40dp.xml",
    "android/java/res/layout/quick_delete_dialog.xml",
    "android/java/res/values/dimens.xml",
    "android/java/res/values/styles.xml",
  ]
  deps = [
    "//chrome/browser/ui/android/strings:ui_strings_grd",
    "//components/browser_ui/settings/android:java_resources",
    "//components/browser_ui/strings/android:browser_ui_strings_grd",
    "//ui/android:ui_java_resources",
  ]
}

robolectric_library("junit") {
  resources_package = "org.chromium.chrome.browser.quick_delete"
  sources = [
    "android/junit/src/org/chromium/chrome/browser/quick_delete/QuickDeleteDialogDelegateUnitTest.java",
    "android/junit/src/org/chromium/chrome/browser/quick_delete/QuickDeleteMediatorTest.java",
    "android/junit/src/org/chromium/chrome/browser/quick_delete/QuickDeleteMetricsDelegateTest.java",
    "android/junit/src/org/chromium/chrome/browser/quick_delete/QuickDeleteTabsFilterTest.java",
    "android/junit/src/org/chromium/chrome/browser/quick_delete/QuickDeleteViewBinderTest.java",
  ]
  deps = [
    ":java",
    ":java_resources",
    "//base:base_java",
    "//base:base_java_test_support",
    "//base:base_junit_test_support",
    "//chrome/browser/browsing_data/android:java",
    "//chrome/browser/flags:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/settings:factory_java",
    "//chrome/browser/signin/services/android:java",
    "//chrome/browser/sync/android:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/tab_group:java",
    "//chrome/browser/tabmodel:java",
    "//chrome/browser/ui/messages/android:java",
    "//chrome/test/android:chrome_java_integration_test_support",
    "//chrome/test/android:chrome_java_test_support_common",
    "//components/browser_ui/settings/android:java",
    "//components/browser_ui/widget/android:java",
    "//components/browsing_data/core:java",
    "//components/embedder_support/android:util_java",
    "//components/signin/public/android:java",
    "//components/signin/public/android:signin_java_test_support",
    "//components/sync/android:sync_java",
    "//content/public/android:content_full_java",
    "//content/public/test/android:content_java_test_support",
    "//third_party/androidx:androidx_test_runner_java",
    "//third_party/junit:junit",
    "//third_party/mockito:mockito_java",
    "//ui/android:ui_java_test_support",
    "//ui/android:ui_no_recycler_view_java",
  ]
}

android_library("javatests") {
  testonly = true
  resources_package = "org.chromium.chrome.browser.quick_delete"

  sources = [
    "android/javatests/src/org/chromium/chrome/browser/quick_delete/QuickDeleteAnimationGradientDrawableRenderTest.java",
    "android/javatests/src/org/chromium/chrome/browser/quick_delete/QuickDeleteBridgeTest.java",
    "android/javatests/src/org/chromium/chrome/browser/quick_delete/QuickDeleteControllerTest.java",
    "android/javatests/src/org/chromium/chrome/browser/quick_delete/QuickDeleteDialogDelegateTest.java",
  ]

  deps = [
    ":java",
    ":java_resources",
    "//base:base_java",
    "//base:base_java_test_support",
    "//chrome/android:chrome_app_java_resources",
    "//chrome/android:chrome_java",
    "//chrome/browser/browsing_data/android:java",
    "//chrome/browser/flags:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/sync/android:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/tabmodel:java",
    "//chrome/browser/ui/android/appmenu:java",
    "//chrome/browser/ui/android/appmenu/test:test_support_java",
    "//chrome/browser/ui/android/layouts:java",
    "//chrome/browser/ui/android/layouts/test:java",
    "//chrome/browser/ui/android/night_mode:night_mode_java_test_support",
    "//chrome/test/android:chrome_java_integration_test_support",
    "//chrome/test/android:chrome_java_test_support_common",
    "//components/browsing_data/core:java",
    "//components/embedder_support/android:content_view_java",
    "//components/signin/public/android:java",
    "//components/sync/android:sync_java",
    "//content/public/android:content_java",
    "//content/public/test/android:content_java_test_support",
    "//net/android:net_java_test_support",
    "//third_party/android_deps:espresso_java",
    "//third_party/androidx:androidx_fragment_fragment_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/androidx:androidx_test_runner_java",
    "//third_party/hamcrest:hamcrest_core_java",
    "//third_party/jni_zero:jni_zero_java",
    "//third_party/junit:junit",
    "//third_party/mockito:mockito_java",
    "//ui/android:ui_java_test_support",
    "//ui/android:ui_no_recycler_view_java",
  ]
}