| # 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") |
| |
| android_library("java") { |
| sources = [ |
| "java/src/org/chromium/components/browser_ui/settings/CustomDividerFragment.java", |
| "java/src/org/chromium/components/browser_ui/settings/CustomStyledPreference.java", |
| "java/src/org/chromium/components/browser_ui/settings/EmbeddableSettingsPage.java", |
| "java/src/org/chromium/components/browser_ui/settings/FragmentSettingsNavigation.java", |
| "java/src/org/chromium/components/browser_ui/settings/ManagedPreferenceDelegate.java", |
| "java/src/org/chromium/components/browser_ui/settings/ManagedPreferencesUtils.java", |
| "java/src/org/chromium/components/browser_ui/settings/PreferenceStyle.java", |
| "java/src/org/chromium/components/browser_ui/settings/SearchUtils.java", |
| "java/src/org/chromium/components/browser_ui/settings/SettingsCustomTabLauncher.java", |
| "java/src/org/chromium/components/browser_ui/settings/SettingsFragment.java", |
| "java/src/org/chromium/components/browser_ui/settings/SettingsNavigation.java", |
| "java/src/org/chromium/components/browser_ui/settings/SettingsStylingController.java", |
| "java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ButtonPreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/CardPreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/CardWithButtonPreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ChromeBaseCheckBoxPreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ChromeBasePreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ChromeImageViewPreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ChromeSwitchPreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ClickableSpansTextMessagePreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ExpandablePreferenceGroup.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/FaviconViewUtils.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ImageButtonPreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/LearnMorePreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/LongSummaryTextMessagePreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/PaddedItemDecorationWithDivider.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/SettingsItemBackgroundDecoration.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/SpinnerPreference.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/TextMessagePreference.java", |
| ] |
| deps = [ |
| ":java_resources", |
| "//base:base_java", |
| "//build/android:build_java", |
| "//components/browser_ui/styles/android:java", |
| "//components/browser_ui/util/android:java", |
| "//components/browser_ui/widget/android:java", |
| "//components/policy/android:policy_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_core_core_java", |
| "//third_party/androidx:androidx_fragment_fragment_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_java", |
| "//ui/android:ui_no_recycler_view_java", |
| ] |
| resources_package = "org.chromium.components.browser_ui.settings" |
| } |
| |
| android_resources("java_resources") { |
| deps = [ |
| "//components/browser_ui/strings/android:browser_ui_strings_grd", |
| "//components/browser_ui/styles/android:java_resources", |
| "//components/browser_ui/widget/android:java_resources", |
| "//third_party/androidx:androidx_preference_preference_java", |
| "//ui/android:ui_java_resources", |
| ] |
| sources = [ |
| "java/res/drawable-hdpi/ic_account_child_grey600_36dp.png", |
| "java/res/drawable-hdpi/ic_business_small.png", |
| "java/res/drawable-mdpi/ic_account_child_grey600_36dp.png", |
| "java/res/drawable-mdpi/ic_business_small.png", |
| "java/res/drawable-xhdpi/ic_account_child_grey600_36dp.png", |
| "java/res/drawable-xhdpi/ic_business_small.png", |
| "java/res/drawable-xxhdpi/ic_account_child_grey600_36dp.png", |
| "java/res/drawable-xxhdpi/ic_business_small.png", |
| "java/res/drawable-xxxhdpi/ic_account_child_grey600_36dp.png", |
| "java/res/drawable/enterprise_icon.xml", |
| "java/res/drawable/ic_business_small_with_bg.xml", |
| "java/res/drawable/list_divider.xml", |
| "java/res/layout-sw360dp/preference_spinner_single_line.xml", |
| "java/res/layout/button_preference_button.xml", |
| "java/res/layout/button_preference_layout.xml", |
| "java/res/layout/card_preference.xml", |
| "java/res/layout/card_with_button_preference_layout.xml", |
| "java/res/layout/checkable_image_view_widget.xml", |
| "java/res/layout/clickable_spans_text_message_preference_layout.xml", |
| "java/res/layout/image_button_widget.xml", |
| "java/res/layout/long_summary_text_message_preference.xml", |
| "java/res/layout/managed_disclaimer_preference_for_radio_groups.xml", |
| "java/res/layout/preference_chrome_image_view.xml", |
| "java/res/layout/preference_spinner.xml", |
| "java/res/layout/preference_spinner_single_line.xml", |
| "java/res/layout/preference_spinner_single_line_item.xml", |
| "java/res/layout/settings_action_bar_shadow.xml", |
| "java/res/values-sw600dp/dimens.xml", |
| "java/res/values/attrs.xml", |
| "java/res/values/dimens.xml", |
| "java/res/values/ids.xml", |
| "java/res/values/styles.xml", |
| ] |
| } |
| |
| # To be included by embedders that need to show a disclaimer that settings are |
| # managed by an Enterprise admin. |
| android_resources("managed_prefs_java_resources") { |
| deps = [ |
| ":java_resources", |
| "//components/browser_ui/styles/android:java_resources", |
| "//components/browser_ui/widget/android:java_resources", |
| "//third_party/androidx:androidx_preference_preference_java", |
| ] |
| sources = [ |
| "java/managed_prefs_java_resources/layout/chrome_managed_preference.xml", |
| ] |
| } |
| |
| android_library("unit_device_javatests") { |
| testonly = true |
| sources = [ |
| "javatests/src/org/chromium/components/browser_ui/settings/SettingsStylingControllerTest.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/CardWithButtonPreferenceRenderTest.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/CardWithButtonPreferenceTest.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ChromeBaseCheckBoxPreferenceTest.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ChromeBasePreferenceTest.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ChromeImageViewPreferenceTest.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/ChromeSwitchPreferenceTest.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/LearnMorePreferenceTest.java", |
| "widget/java/src/org/chromium/components/browser_ui/settings/TextMessagePreferenceTest.java", |
| ] |
| deps = [ |
| ":java", |
| ":java_resources", |
| ":java_test_resources", |
| ":managed_prefs_java_resources", |
| ":test_support_java", |
| "//base:base_java", |
| "//base:base_java_test_support", |
| "//components/browser_ui/styles/android:java", |
| "//content/public/test/android:content_java_test_support", |
| "//third_party/android_deps:espresso_java", |
| "//third_party/android_deps:guava_android_java", |
| "//third_party/androidx:androidx_preference_preference_java", |
| "//third_party/androidx:androidx_test_core_java", |
| "//third_party/androidx:androidx_test_rules_java", |
| "//third_party/androidx:androidx_test_runner_java", |
| "//third_party/hamcrest:hamcrest_java", |
| "//third_party/junit", |
| "//ui/android:ui_java_test_support", |
| "//ui/android:ui_no_recycler_view_java", |
| ] |
| resources_package = "org.chromium.components.browser_ui.settings.test" |
| } |
| |
| robolectric_library("junit") { |
| testonly = true |
| |
| sources = [ "java/src/org/chromium/components/browser_ui/settings/ManagedPreferencesUtilsTest.java" ] |
| |
| deps = [ |
| ":java", |
| ":java_resources", |
| ":managed_prefs_java_resources", |
| ":test_support_java", |
| "//base:base_java", |
| "//base:base_java_test_support", |
| "//base:base_junit_test_support", |
| "//content/public/test/android:content_java_test_support", |
| "//third_party/androidx:androidx_constraintlayout_constraintlayout_java", |
| "//third_party/androidx:androidx_preference_preference_java", |
| "//third_party/androidx:androidx_test_core_java", |
| "//third_party/androidx:androidx_test_runner_java", |
| "//third_party/junit", |
| "//ui/android:ui_java_test_support", |
| "//ui/android:ui_no_recycler_view_java", |
| ] |
| |
| resources_package = "org.chromium.components.browser_ui.settings.test" |
| } |
| |
| android_library("test_support_java") { |
| testonly = true |
| |
| sources = [ |
| "widget/test_support_java/src/org/chromium/components/browser_ui/settings/BlankUiTestActivitySettingsTestRule.java", |
| "widget/test_support_java/src/org/chromium/components/browser_ui/settings/ManagedPreferenceTestDelegates.java", |
| "widget/test_support_java/src/org/chromium/components/browser_ui/settings/Matchers.java", |
| "widget/test_support_java/src/org/chromium/components/browser_ui/settings/PlaceholderSettingsForTest.java", |
| ] |
| |
| deps = [ |
| ":java", |
| ":managed_prefs_java_resources", |
| "//base:base_java", |
| "//base:base_java_test_support", |
| "//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_lifecycle_lifecycle_common_java", |
| "//third_party/androidx:androidx_preference_preference_java", |
| "//third_party/hamcrest:hamcrest_java", |
| "//ui/android:ui_java_test_support", |
| ] |
| |
| resources_package = "org.chromium.components.browser_ui.settings.test" |
| } |
| |
| android_resources("java_test_resources") { |
| testonly = true |
| sources = [ |
| "widget/java_test_resources/res/layout/chrome_managed_preference_with_custom_layout.xml", |
| "widget/java_test_resources/res/xml/test_chrome_base_checkbox_preference_screen.xml", |
| "widget/java_test_resources/res/xml/test_chrome_base_preference_screen.xml", |
| "widget/java_test_resources/res/xml/test_chrome_switch_preference_screen.xml", |
| ] |
| deps = [ |
| ":java_resources", |
| ":managed_prefs_java_resources", |
| "//third_party/androidx:androidx_constraintlayout_constraintlayout_java", |
| "//third_party/androidx:androidx_preference_preference_java", |
| "//ui/android:ui_java_resources", |
| ] |
| } |