chromium/chrome/browser/settings/BUILD.gn

# Copyright 2019 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("//chrome/android/features/android_library_factory_tmpl.gni")

android_library_factory("factory_java") {
  deps = [ "//components/browser_ui/settings/android:java" ]

  sources = [ "android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherFactory.java" ]
}

android_library("internal_java") {
  deps = [
    "//base:resetters_java",

    # Exception: depends on :chrome_java for SettingsLauncherImpl.
    "//chrome/android:chrome_java",
    "//components/browser_ui/settings/android:java",
  ]

  sources = [ "android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherFactory.java" ]
}

android_library("java") {
  sources = [
    "android/java/src/org/chromium/chrome/browser/settings/ChromeBaseSettingsFragment.java",
    "android/java/src/org/chromium/chrome/browser/settings/ChromeManagedPreferenceDelegate.java",
    "android/java/src/org/chromium/chrome/browser/settings/FaviconLoader.java",
    "android/java/src/org/chromium/chrome/browser/settings/ProfileDependentSetting.java",
  ]
  public_deps = [ ":factory_java" ]
  deps = [
    "//base:base_java",
    "//chrome/browser/feedback/android:factory_java",
    "//chrome/browser/feedback/android:java",
    "//chrome/browser/preferences:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/ui/android/favicon:java",
    "//components/browser_ui/settings/android:java",
    "//components/browser_ui/settings/android:managed_prefs_java_resources",
    "//components/browser_ui/widget/android:java",
    "//components/favicon/android:java",
    "//components/prefs/android:java",
    "//components/user_prefs/android:java",
    "//content/public/android:content_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_constraintlayout_constraintlayout_java",
    "//third_party/androidx:androidx_fragment_fragment_java",
    "//third_party/androidx:androidx_preference_preference_java",
    "//url:gurl_java",
  ]
  resources_package = "org.chromium.chrome.browser.settings"
}

android_library("test_support_java") {
  testonly = true

  sources = [ "android/java/src/org/chromium/chrome/browser/settings/SettingsActivityTestRule.java" ]

  deps = [
    "//base:base_java_test_support",
    "//chrome/android:chrome_java",
    "//chrome/browser/settings:java",
    "//components/browser_ui/settings/android:java",
    "//content/public/test/android:content_java_test_support",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_fragment_fragment_java",
    "//third_party/androidx:androidx_preference_preference_java",
    "//third_party/androidx:androidx_test_core_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/junit",
  ]
}

android_library("junit_test_support") {
  testonly = true
  sources = [ "android/java/src/org/chromium/chrome/browser/settings/TestSettingsFragment.java" ]
  deps = [
    ":junit_test_resources",
    "//base:base_java",
    "//base:base_java_test_support",
    "//components/browser_ui/settings/android:java",
    "//components/browser_ui/widget/android:java",
    "//third_party/androidx:androidx_annotation_annotation_jvm_java",
    "//third_party/androidx:androidx_preference_preference_java",
  ]
  resources_package = "org.chromium.chrome.browser.settings"
}

android_resources("junit_test_resources") {
  testonly = true
  sources = [ "android/java/res/xml/test_settings_fragment.xml" ]
}