chromium/chrome/browser/search_resumption/BUILD.gn

# Copyright 2022 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 = [
    "java/src/org/chromium/chrome/browser/search_resumption/SearchResumptionModuleBridge.java",
    "java/src/org/chromium/chrome/browser/search_resumption/SearchResumptionModuleCoordinator.java",
    "java/src/org/chromium/chrome/browser/search_resumption/SearchResumptionModuleMediator.java",
    "java/src/org/chromium/chrome/browser/search_resumption/SearchResumptionModuleProperties.java",
    "java/src/org/chromium/chrome/browser/search_resumption/SearchResumptionModuleUtils.java",
    "java/src/org/chromium/chrome/browser/search_resumption/SearchResumptionModuleView.java",
    "java/src/org/chromium/chrome/browser/search_resumption/SearchResumptionModuleViewBinder.java",
    "java/src/org/chromium/chrome/browser/search_resumption/SearchResumptionTileBuilder.java",
    "java/src/org/chromium/chrome/browser/search_resumption/SearchResumptionTileContainerView.java",
    "java/src/org/chromium/chrome/browser/search_resumption/SearchResumptionTileView.java",
    "java/src/org/chromium/chrome/browser/search_resumption/SearchResumptionUserData.java",
  ]
  deps = [
    ":java_resources",
    "//base:base_java",
    "//build/android:build_java",
    "//chrome/browser/flags:java",
    "//chrome/browser/preferences:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/search_engines/android:java",
    "//chrome/browser/signin/services/android:java",
    "//chrome/browser/sync/android:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/tabmodel:java",
    "//chrome/browser/ui/android/omnibox:java",
    "//components/embedder_support/android:util_java",
    "//components/omnibox/browser:browser_java",
    "//components/search_engines/android:java",
    "//components/signin/public/android:java",
    "//components/sync/android:sync_java",
    "//content/public/android:content_full_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/jni_zero:jni_zero_java",
    "//third_party/metrics_proto:metrics_proto_java",
    "//ui/android:ui_java_resources",
    "//ui/android:ui_no_recycler_view_java",
    "//url:gurl_java",
  ]
  resources_package = "org.chromium.chrome.browser.search_resumption"
}

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

android_resources("java_resources") {
  sources = [
    "java/res/drawable/search_resumption_module_background_bottom.xml",
    "java/res/drawable/search_resumption_module_background_middle.xml",
    "java/res/drawable/search_resumption_module_background_top.xml",
    "java/res/layout/search_resumption_module_layout.xml",
    "java/res/layout/search_resumption_module_tile_layout.xml",
    "java/res/values/dimens.xml",
  ]
  deps = [ "//components/browser_ui/strings/android:browser_ui_strings_grd" ]
}

robolectric_library("junit") {
  testonly = true
  resources_package = "org.chromium.chrome.browser.search_resumption"

  sources = [
    "junit/src/org/chromium/chrome/browser/search_resumption/SearchResumptionModuleMediatorUnitTest.java",
    "junit/src/org/chromium/chrome/browser/search_resumption/SearchResumptionModuleUtilsUnitTest.java",
    "junit/src/org/chromium/chrome/browser/search_resumption/SearchResumptionModuleViewUnitTest.java",
    "junit/src/org/chromium/chrome/browser/search_resumption/SearchResumptionTileBuilderUnitTest.java",
  ]

  deps = [
    ":java",
    ":java_resources",
    "//base:base_java",
    "//base:base_java_test_support",
    "//base:base_junit_test_support",
    "//chrome/browser/flags:java",
    "//chrome/browser/preferences:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/search_engines/android:java",
    "//chrome/browser/signin/services/android:java",
    "//chrome/browser/sync/android:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/ui/android/omnibox:java",
    "//chrome/test/android:chrome_java_unit_test_support",
    "//components/embedder_support/android:util_java",
    "//components/omnibox/browser:browser_java",
    "//components/search_engines/android:java",
    "//components/signin/public/android:java",
    "//components/sync/android:sync_java",
    "//content/public/android:content_full_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/androidx:androidx_test_runner_java",
    "//third_party/jni_zero:jni_zero_java",
    "//third_party/junit:junit",
    "//third_party/mockito:mockito_java",
    "//ui/android:ui_no_recycler_view_java",
    "//url:gurl_java",
    "//url:gurl_junit_test_support",
  ]
}