chromium/chrome/browser/history/BUILD.gn

# Copyright 2024 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/config.gni")
import("//build/config/android/rules.gni")
import("//chrome/browser/buildflags.gni")
import("//third_party/jni_zero/jni_zero.gni")

android_library("java") {
  srcjar_deps = [ ":jni_headers" ]
  sources = [
    "java/src/org/chromium/chrome/browser/history/AppFilterCoordinator.java",
    "java/src/org/chromium/chrome/browser/history/AppFilterMediator.java",
    "java/src/org/chromium/chrome/browser/history/AppFilterProperties.java",
    "java/src/org/chromium/chrome/browser/history/AppFilterSheetContent.java",
    "java/src/org/chromium/chrome/browser/history/AppFilterViewBinder.java",
    "java/src/org/chromium/chrome/browser/history/HistoryTabHelper.java",
  ]

  deps = [
    ":java_resources",
    "//base:base_java",
    "//chrome/browser/tab:java",
    "//components/browser_ui/bottomsheet/android:java",
    "//content/public/android:content_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_recyclerview_recyclerview_java",
    "//third_party/jni_zero:jni_zero_java",
    "//ui/android:ui_full_java",
  ]
  resources_package = "org.chromium.chrome.browser.history"
}

generate_jni("jni_headers") {
  sources =
      [ "java/src/org/chromium/chrome/browser/history/HistoryTabHelper.java" ]
}

android_resources("java_resources") {
  sources = [
    "java/res/layout/appfilter_content.xml",
    "java/res/layout/appfilter_header.xml",
  ]
  deps = [
    "//chrome/browser/ui/android/strings:ui_strings_grd",
    "//components/browser_ui/widget/android:java_resources",
  ]
}

android_library("unit_device_javatests") {
  testonly = true
  resources_package = "org.chromium.chrome.browser.history"

  sources = [ "java/src/org/chromium/chrome/browser/history/AppFilterCoordinatorTest.java" ]

  deps = [
    ":java",
    ":java_resources",
    "//base:base_java",
    "//base:base_java_test_support",
    "//chrome/browser/flags:java",
    "//chrome/test/android:chrome_java_unit_test_support",
    "//components/browser_ui/bottomsheet/android:factory_java",
    "//components/browser_ui/bottomsheet/android:java",
    "//components/browser_ui/bottomsheet/android:manager_java",
    "//components/browser_ui/widget/android:java",
    "//content/public/test/android:content_java_test_support",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/androidx:androidx_test_rules_java",
    "//third_party/androidx:androidx_test_runner_java",
    "//third_party/junit",
    "//ui/android:ui_java",
    "//ui/android:ui_java_test_support",
  ]
}