# Copyright 2020 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("//build/config/locales.gni")
import("//chrome/android/features/android_library_factory_tmpl.gni")
import("//chrome/common/features.gni")
import("//third_party/jni_zero/jni_zero.gni")
import("//tools/grit/grit_rule.gni")
_factory_sources = [ "java/src/org/chromium/chrome/browser/password_check/PasswordCheckFactory.java" ]
_public_target = "//chrome/browser/password_check/android:public_java"
android_library_factory("public_factory_java") {
# These deps will be inherited by the resulting android_library target.
deps = [
"//chrome/browser/settings:java",
"//components/browser_ui/settings/android:java",
_public_target,
]
# This internal file will be replaced by a generated file so the resulting
# android_library target does not actually depend on this internal file.
sources = _factory_sources
}
android_library("internal_factory_java") {
deps = [
":internal_java",
"//base:base_java",
"//chrome/browser/flags:java",
"//chrome/browser/settings:java",
"//components/browser_ui/settings/android:java",
"//third_party/androidx:androidx_annotation_annotation_java",
_public_target,
]
sources = _factory_sources
}
_ui_factory_sources = [ "java/src/org/chromium/chrome/browser/password_check/PasswordCheckComponentUiFactory.java" ]
_public_ui_target = "//chrome/browser/password_check/android:public_ui_java"
android_library_factory("public_ui_factory_java") {
deps = [
"//chrome/browser/feedback/android:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/settings:java",
"//components/browser_ui/settings/android:java",
"//third_party/androidx:androidx_fragment_fragment_java",
"//third_party/androidx:androidx_preference_preference_java",
_public_ui_target,
]
sources = _ui_factory_sources
}
android_library("internal_ui_factory_java") {
deps = [
":internal_java",
"//chrome/browser/feedback/android:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/settings:java",
"//components/browser_ui/settings/android:java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_preference_preference_java",
_public_target,
_public_ui_target,
]
sources = _ui_factory_sources
}
generate_jni("internal_jni") {
sources = [ "java/src/org/chromium/chrome/browser/password_check/PasswordCheckBridge.java" ]
}
android_library("internal_java") {
deps = [
":java_resources",
":public_factory_java",
"//base:base_java",
"//build/android:build_java",
"//chrome/android:chrome_app_java_resources",
"//chrome/browser/device_reauth/android:java",
"//chrome/browser/feedback/android:factory_java",
"//chrome/browser/feedback/android:java",
"//chrome/browser/flags:java",
"//chrome/browser/password_check/android:password_check_java_enums",
"//chrome/browser/password_check/android:public_ui_java",
"//chrome/browser/password_manager/android:java",
"//chrome/browser/password_manager/android:settings_interface_java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/settings:java",
"//chrome/browser/ui/android/favicon:java",
"//chrome/browser/ui/android/strings:ui_strings_grd",
"//components/browser_ui/settings/android:java",
"//components/browser_ui/strings/android:browser_ui_strings_grd",
"//components/browser_ui/styles/android:java_resources",
"//components/browser_ui/widget/android:java",
"//components/device_reauth:device_reauth_java_enums",
"//components/embedder_support/android:util_java",
"//components/favicon/android:java",
"//components/password_manager/core/browser:password_manager_java_enums",
"//content/public/android:content_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_appcompat_appcompat_java",
"//third_party/androidx:androidx_appcompat_appcompat_resources_java",
"//third_party/androidx:androidx_browser_browser_java",
"//third_party/androidx:androidx_core_core_java",
"//third_party/androidx:androidx_fragment_fragment_java",
"//third_party/androidx:androidx_lifecycle_lifecycle_common_java",
"//third_party/androidx:androidx_preference_preference_java",
"//third_party/androidx:androidx_recyclerview_recyclerview_java",
"//third_party/jni_zero:jni_zero_java",
"//ui/android:ui_full_java",
"//url:gurl_java",
_public_target,
]
srcjar_deps = [ ":internal_jni" ]
sources = [
"java/src/org/chromium/chrome/browser/password_check/PasswordCheckBridge.java",
"java/src/org/chromium/chrome/browser/password_check/PasswordCheckCoordinator.java",
"java/src/org/chromium/chrome/browser/password_check/PasswordCheckDeletionDialogFragment.java",
"java/src/org/chromium/chrome/browser/password_check/PasswordCheckDialogFragment.java",
"java/src/org/chromium/chrome/browser/password_check/PasswordCheckImpl.java",
"java/src/org/chromium/chrome/browser/password_check/PasswordCheckMediator.java",
"java/src/org/chromium/chrome/browser/password_check/PasswordCheckProperties.java",
"java/src/org/chromium/chrome/browser/password_check/PasswordCheckViewBinder.java",
"java/src/org/chromium/chrome/browser/password_check/PasswordCheckViewDialogFragment.java",
"java/src/org/chromium/chrome/browser/password_check/PasswordCheckViewHolder.java",
"java/src/org/chromium/chrome/browser/password_check/helper/PasswordCheckChangePasswordHelper.java",
"java/src/org/chromium/chrome/browser/password_check/helper/PasswordCheckIconHelper.java",
]
resources_package = "org.chromium.chrome.browser.password_check"
}
android_resources("java_resources") {
deps = [
":java_strings_grd",
"//chrome/browser/password_check/android:java_resources",
"//components/browser_ui/settings/android:java_resources",
"//components/browser_ui/styles/android:java_resources",
]
sources = [
"java/res/drawable-night/password_check_positive.xml",
"java/res/drawable/password_check_positive.xml",
"java/res/layout/password_check_compromised_credential_item.xml",
"java/res/layout/password_check_header_item.xml",
"java/res/layout/password_check_view_credential_dialog.xml",
"java/res/values/dimens.xml",
]
}
java_strings_grd("java_strings_grd") {
defines = chrome_grit_defines
grd_file = "java/strings/android_password_check_strings.grd"
outputs =
[ "values/android_password_check_strings.xml" ] +
process_file_template(
android_bundle_locales_as_resources,
[ "values-{{source_name_part}}/android_password_check_strings.xml" ])
}