# Copyright 2017 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")
generate_jni("nonembedded_jni_headers") {
sources = [
"java/src/org/chromium/android_webview/nonembedded/AwComponentUpdateService.java",
"java/src/org/chromium/android_webview/nonembedded/NetworkFetcherTask.java",
"java/src/org/chromium/android_webview/nonembedded/WebViewApkApplication.java",
"java/src/org/chromium/android_webview/services/ComponentsProviderPathUtil.java",
]
}
# Contains classes needed by the webview apk, but not used when loading the apk
# as a library.
android_library("nonembedded_java") {
srcjar_deps = [ ":nonembedded_jni_headers" ]
sources = [
"java/src/org/chromium/android_webview/nonembedded/AwComponentUpdateService.java",
"java/src/org/chromium/android_webview/nonembedded/AwNonembeddedUmaRecorder.java",
"java/src/org/chromium/android_webview/nonembedded/AwPureJavaExceptionReporter.java",
"java/src/org/chromium/android_webview/nonembedded/LicenseActivity.java",
"java/src/org/chromium/android_webview/nonembedded/LicenseContentProvider.java",
"java/src/org/chromium/android_webview/nonembedded/NetworkFetcherTask.java",
"java/src/org/chromium/android_webview/nonembedded/WebViewApkApplication.java",
]
deps = [
":crash_java",
":devui_java",
":services_java",
":util_java",
"//android_webview:android_webview_product_config_java",
"//android_webview:common_aidl_java",
"//android_webview:common_java",
"//android_webview:common_platform_services_java",
"//android_webview/glue:glue_java",
"//android_webview/proto:metrics_bridge_records_proto_java",
"//base:base_java",
"//base/version_info/android:version_constants_java",
"//build/android:build_java",
"//components/about_ui/android:aboutui_java",
"//components/crash/android:java",
"//components/embedder_support/android:application_java",
"//components/minidump_uploader:minidump_uploader_java",
"//third_party/android_deps:com_google_code_findbugs_jsr305_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/jni_zero:jni_zero_java",
"//ui/android:ui_no_recycler_view_java",
"//url:url_java",
]
}
android_library("devui_java") {
sources = [
"java/src/org/chromium/android_webview/devui/ComponentsListFragment.java",
"java/src/org/chromium/android_webview/devui/CrashesListFragment.java",
"java/src/org/chromium/android_webview/devui/DevUiBaseFragment.java",
"java/src/org/chromium/android_webview/devui/FlagsFragment.java",
"java/src/org/chromium/android_webview/devui/HomeFragment.java",
"java/src/org/chromium/android_webview/devui/MainActivity.java",
"java/src/org/chromium/android_webview/devui/NetLogsFragment.java",
"java/src/org/chromium/android_webview/devui/PersistentErrorView.java",
"java/src/org/chromium/android_webview/devui/SafeModeFragment.java",
"java/src/org/chromium/android_webview/devui/WebViewPackageError.java",
"java/src/org/chromium/android_webview/devui/util/ComponentInfo.java",
"java/src/org/chromium/android_webview/devui/util/ComponentsInfoLoader.java",
"java/src/org/chromium/android_webview/devui/util/CrashBugUrlFactory.java",
"java/src/org/chromium/android_webview/devui/util/CrashInfoLoader.java",
"java/src/org/chromium/android_webview/devui/util/SafeIntentUtils.java",
"java/src/org/chromium/android_webview/devui/util/SafeModeActionInfo.java",
"java/src/org/chromium/android_webview/devui/util/SafeModeInfo.java",
"java/src/org/chromium/android_webview/devui/util/UnuploadedFilesStateLoader.java",
"java/src/org/chromium/android_webview/devui/util/UploadedCrashesInfoLoader.java",
"java/src/org/chromium/android_webview/devui/util/WebViewCrashInfoCollector.java",
"java/src/org/chromium/android_webview/devui/util/WebViewCrashLogParser.java",
]
deps = [
":crash_java",
":devui_resources",
":services_java",
":util_java",
"//android_webview:common_aidl_java",
"//android_webview:common_java",
"//android_webview:common_platform_services_java",
"//base:base_java",
"//base/version_info/android:version_constants_java",
"//components/minidump_uploader:minidump_uploader_java",
"//third_party/androidx:androidx_activity_activity_java",
"//third_party/androidx:androidx_annotation_annotation_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_lifecycle_lifecycle_viewmodel_java",
"//third_party/androidx:androidx_savedstate_savedstate_java",
"//ui/android:ui_no_recycler_view_java",
]
resources_package = "org.chromium.android_webview.devui"
}
android_library("services_java") {
sources = [
"java/src/org/chromium/android_webview/services/AwMinidumpUploadJobService.java",
"java/src/org/chromium/android_webview/services/AwMinidumpUploaderDelegate.java",
"java/src/org/chromium/android_webview/services/AwNetLogService.java",
"java/src/org/chromium/android_webview/services/AwVariationsSeedFetcher.java",
"java/src/org/chromium/android_webview/services/ComponentUpdaterResetSafeModeAction.java",
"java/src/org/chromium/android_webview/services/ComponentUpdaterSafeModeUtils.java",
"java/src/org/chromium/android_webview/services/ComponentsProviderPathUtil.java",
"java/src/org/chromium/android_webview/services/ComponentsProviderService.java",
"java/src/org/chromium/android_webview/services/CrashLoggingUtils.java",
"java/src/org/chromium/android_webview/services/CrashReceiverService.java",
"java/src/org/chromium/android_webview/services/DeveloperModeContentProvider.java",
"java/src/org/chromium/android_webview/services/DeveloperUiService.java",
"java/src/org/chromium/android_webview/services/MetricsBridgeService.java",
"java/src/org/chromium/android_webview/services/MetricsUploadService.java",
"java/src/org/chromium/android_webview/services/NonEmbeddedFastVariationsSeedSafeModeAction.java",
"java/src/org/chromium/android_webview/services/NonEmbeddedSafeModeAction.java",
"java/src/org/chromium/android_webview/services/NonEmbeddedSafeModeActionsSetupCleanup.java",
"java/src/org/chromium/android_webview/services/NonembeddedSafeModeActionsList.java",
"java/src/org/chromium/android_webview/services/SafeModeContentProvider.java",
"java/src/org/chromium/android_webview/services/SafeModeService.java",
"java/src/org/chromium/android_webview/services/SafeModeVariationsSeedContentProvider.java",
"java/src/org/chromium/android_webview/services/StartupFeatureMetadataHolder.java",
"java/src/org/chromium/android_webview/services/VariationsSeedHolder.java",
"java/src/org/chromium/android_webview/services/VariationsSeedServer.java",
]
deps = [
":crash_java",
":devui_resources",
"//android_webview:common_aidl_java",
"//android_webview:common_java",
"//android_webview:common_platform_services_java",
"//android_webview:common_variations_java",
"//android_webview/proto:metrics_bridge_records_proto_java",
"//base:base_java",
"//base/version_info/android:version_constants_java",
"//components/background_task_scheduler:background_task_scheduler_task_ids_java",
"//components/component_updater/android:component_provider_service_aidl_java",
"//components/minidump_uploader:minidump_uploader_java",
"//components/variations/android:variations_java",
"//third_party/android_deps:com_google_code_findbugs_jsr305_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/jni_zero:jni_zero_java",
]
resources_package = "org.chromium.android_webview.devui"
}
android_library("util_java") {
sources = [ "java/src/org/chromium/android_webview/nonembedded_util/WebViewPackageHelper.java" ]
deps = [
"//base:base_java",
"//third_party/androidx:androidx_annotation_annotation_java",
]
}
android_library("crash_java") {
sources = [
"java/src/org/chromium/android_webview/nonembedded/crash/CrashInfo.java",
"java/src/org/chromium/android_webview/nonembedded/crash/CrashUploadUtil.java",
"java/src/org/chromium/android_webview/nonembedded/crash/SystemWideCrashDirectories.java",
]
deps = [
"//android_webview:common_java",
"//base:base_java",
"//components/background_task_scheduler:background_task_scheduler_task_ids_java",
"//components/minidump_uploader:minidump_uploader_java",
"//third_party/androidx:androidx_annotation_annotation_java",
]
}
source_set("nonembedded") {
sources = [
"component_updater/aw_component_installer_policy.cc",
"component_updater/aw_component_installer_policy.h",
"component_updater/aw_component_installer_policy_shim.cc",
"component_updater/aw_component_installer_policy_shim.h",
"component_updater/aw_component_update_service.cc",
"component_updater/aw_component_update_service.h",
"component_updater/aw_component_updater_configurator.cc",
"component_updater/aw_component_updater_configurator.h",
"component_updater/registration.cc",
"component_updater/registration.h",
"net/network_fetcher_task.cc",
"net/network_fetcher_task.h",
"net/network_impl.cc",
"net/network_impl.h",
"webview_apk_application.cc",
"webview_apk_process.cc",
"webview_apk_process.h",
]
deps = [
":nonembedded_jni_headers",
"//android_webview/common",
"//base",
"//components/component_updater",
"//components/component_updater/installer_policies:installer_policies_no_content_deps",
"//components/prefs",
"//components/update_client",
"//components/update_client:in_process_patcher",
"//components/update_client:in_process_unzipper",
"//components/version_info",
"//components/version_info/android:channel_getter",
"//mojo/public/cpp/base:protobuf_support",
"//url",
# Called via JNI by LicenseContentProvider in :nonembedded_java.
"//components/about_ui:about_ui_android",
]
# Disallow depending on content.
assert_no_deps = [ "//content/public" ]
}
# WebView icon used by upstream SystemWebView and Trichrome.
android_resources("icon_resources") {
sources = [
"java/res_icon/drawable-hdpi/icon_webview.png",
"java/res_icon/drawable-mdpi/icon_webview.png",
"java/res_icon/drawable-xhdpi/icon_webview.png",
"java/res_icon/drawable-xxhdpi/icon_webview.png",
]
}
android_resources("devui_resources") {
sources = [
"java/res_devui/drawable/blue_circle.xml",
"java/res_devui/drawable/ic_action_home.xml",
"java/res_devui/drawable/ic_alert_error.xml",
"java/res_devui/drawable/ic_clear_text.xml",
"java/res_devui/drawable/ic_delete.xml",
"java/res_devui/drawable/ic_devui_search.xml",
"java/res_devui/drawable/ic_flag.xml",
"java/res_devui/drawable/ic_net_log.xml",
"java/res_devui/layout/activity_main.xml",
"java/res_devui/layout/components_list_item.xml",
"java/res_devui/layout/crashes_list_item_body.xml",
"java/res_devui/layout/crashes_list_item_header.xml",
"java/res_devui/layout/flag_states.xml",
"java/res_devui/layout/flag_ui_warning.xml",
"java/res_devui/layout/fragment_components_list.xml",
"java/res_devui/layout/fragment_crashes_list.xml",
"java/res_devui/layout/fragment_flags.xml",
"java/res_devui/layout/fragment_home.xml",
"java/res_devui/layout/fragment_net_logs.xml",
"java/res_devui/layout/fragment_safe_mode.xml",
"java/res_devui/layout/net_log_entry.xml",
"java/res_devui/layout/persistent_error_message.xml",
"java/res_devui/layout/safe_mode_actions_list_item.xml",
"java/res_devui/layout/toggleable_flag.xml",
"java/res_devui/layout/two_line_list_item.xml",
"java/res_devui/layout/two_line_sublist_item.xml",
"java/res_devui/menu/components_options_menu.xml",
"java/res_devui/menu/crashes_options_menu.xml",
"java/res_devui/menu/net_log_menu.xml",
"java/res_devui/menu/options_menu.xml",
"java/res_devui/values-night/colors.xml",
"java/res_devui/values-night/styles.xml",
"java/res_devui/values/colors.xml",
"java/res_devui/values/strings.xml",
"java/res_devui/values/styles.xml",
"java/res_devui/xml/provider_paths.xml",
]
}
android_resources("devui_launcher_icon_resources") {
sources = []
android_manifest = "java/DeveloperUiLauncherManifest.xml"
}
android_resources("monochrome_devui_launcher_icon_resources") {
sources = []
android_manifest = "java/MonochromeDeveloperUiLauncherManifest.xml"
}