chromium/chrome/browser/auxiliary_search/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/config.gni")
import("//build/config/android/rules.gni")
import("//chrome/browser/buildflags.gni")

android_library("java") {
  sources = [ "java/src/org/chromium/chrome/browser/auxiliary_search/AuxiliarySearchControllerFactory.java" ]

  deps = [
    "//chrome/browser/flags:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/tabmodel:java",
    "//third_party/androidx:androidx_annotation_annotation_java",
  ]

  public_deps = [ ":delegate_java" ]
}

android_library("delegate_java") {
  sources = [
    "java/src/org/chromium/chrome/browser/auxiliary_search/AuxiliarySearchController.java",
    "java/src/org/chromium/chrome/browser/auxiliary_search/AuxiliarySearchHooks.java",
    "java/src/org/chromium/chrome/browser/auxiliary_search/AuxiliarySearchHooksImpl.java",
  ]

  deps = [
    "//chrome/browser/android/lifecycle:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/tabmodel:java",
    "//third_party/androidx:androidx_annotation_annotation_java",
  ]

  # Add the actual implementation where necessary so that downstream targets
  # can provide their own implementations.
  jar_excluded_patterns = [ "*/AuxiliarySearchHooksImpl.class" ]
}

android_library("delegate_public_impl_java") {
  sources = [ "java/src/org/chromium/chrome/browser/auxiliary_search/AuxiliarySearchHooksImpl.java" ]

  deps = [
    ":java",
    "//chrome/browser/android/lifecycle:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/tabmodel:java",
  ]
}