OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
| 5 import("//build/config/ios/rules.gni") |
5 import("//build/config/locales.gni") | 6 import("//build/config/locales.gni") |
| 7 import("//build/config/mac/base_rules.gni") |
| 8 import("//build/mac/tweak_info_plist.gni") |
| 9 import("//ios/build/chrome_build.gni") |
6 import("//ios/chrome/extension_repack.gni") | 10 import("//ios/chrome/extension_repack.gni") |
| 11 import("//ios/public/provider/chrome/browser/build_config.gni") |
7 | 12 |
8 extension_repack_all_locales("packed_resources") { | 13 extension_repack_all_locales("packed_resources") { |
9 extension = "today_extension" | 14 extension = "today_extension" |
10 input_locales = ios_packed_locales | 15 input_locales = ios_packed_locales |
11 output_locales = ios_packed_locales_as_mac_outputs | 16 output_locales = ios_packed_locales_as_mac_outputs |
12 copy_data_to_bundle = true | 17 copy_data_to_bundle = true |
13 } | 18 } |
| 19 |
| 20 tweak_info_plist("tweak_info_plist") { |
| 21 info_plist = "Info.plist" |
| 22 } |
| 23 |
| 24 compile_plist("entitlements") { |
| 25 format = "xml1" |
| 26 substitutions = [ "IOS_BUNDLE_ID_PREFIX=$ios_app_bundle_id_prefix" ] |
| 27 output_name = "$target_gen_dir/today_extension.appex.entitlements" |
| 28 plist_templates = |
| 29 [ "entitlements/external/today_extension.appex.entitlements" ] + |
| 30 ios_chrome_entitlements_additions |
| 31 } |
| 32 |
| 33 ios_appex_bundle("today_extension") { |
| 34 sources = [ |
| 35 "footer_label.h", |
| 36 "footer_label.mm", |
| 37 "interactive_label.h", |
| 38 "interactive_label.mm", |
| 39 "lock_screen_state.h", |
| 40 "lock_screen_state.mm", |
| 41 "notification_center_button.h", |
| 42 "notification_center_button.mm", |
| 43 "notification_center_url_button.h", |
| 44 "notification_center_url_button.mm", |
| 45 "physical_web_optin_footer.h", |
| 46 "physical_web_optin_footer.mm", |
| 47 "today_metrics_logger.h", |
| 48 "today_metrics_logger.mm", |
| 49 "today_view_controller.h", |
| 50 "today_view_controller.mm", |
| 51 "transparent_button.h", |
| 52 "transparent_button.mm", |
| 53 "ui_util.h", |
| 54 "ui_util.mm", |
| 55 "url_table_cell.h", |
| 56 "url_table_cell.mm", |
| 57 ] |
| 58 |
| 59 deps = [ |
| 60 ":resources", |
| 61 "//base", |
| 62 "//base:i18n", |
| 63 "//components/metrics", |
| 64 "//components/metrics:net", |
| 65 "//components/open_from_clipboard", |
| 66 "//components/prefs", |
| 67 "//components/variations", |
| 68 "//components/version_info", |
| 69 "//ios/chrome/common", |
| 70 "//ios/chrome/common/app_group", |
| 71 "//ios/chrome/common/app_group:client", |
| 72 "//ios/chrome/common/physical_web", |
| 73 "//ios/chrome/today_extension:packed_resources", |
| 74 "//ios/chrome/today_extension/strings", |
| 75 "//ios/third_party/material_components_ios", |
| 76 "//net", |
| 77 "//ui/base", |
| 78 "//url", |
| 79 ] |
| 80 bundle_deps_filter = [ "//third_party/icu:icudata" ] |
| 81 |
| 82 libs = [ |
| 83 "CoreGraphics.framework", |
| 84 "QuartzCore.framework", |
| 85 "Foundation.framework", |
| 86 "NotificationCenter.framework", |
| 87 "UIKit.framework", |
| 88 "MobileCoreServices.framework", |
| 89 ] |
| 90 |
| 91 extra_substitutions = [ |
| 92 "CHROME_CHANNEL_SCHEME=$url_channel_scheme", |
| 93 "TODAY_EXTENSION_BUNDLE_ID=$chromium_bundle_id.TodayExtension", |
| 94 ] |
| 95 |
| 96 entitlements_target = ":entitlements" |
| 97 info_plist_target = ":tweak_info_plist" |
| 98 } |
| 99 |
| 100 bundle_data("resources") { |
| 101 visibility = [ ":*" ] |
| 102 sources = [ |
| 103 "resources/todayview_clipboard.png", |
| 104 "resources/todayview_clipboard@2x.png", |
| 105 "resources/todayview_clipboard@3x.png", |
| 106 "resources/todayview_new_tab.png", |
| 107 "resources/todayview_new_tab@2x.png", |
| 108 "resources/todayview_new_tab@3x.png", |
| 109 "resources/todayview_physical_web.png", |
| 110 "resources/todayview_physical_web@2x.png", |
| 111 "resources/todayview_physical_web@3x.png", |
| 112 "resources/todayview_voice_search.png", |
| 113 "resources/todayview_voice_search@2x.png", |
| 114 "resources/todayview_voice_search@3x.png", |
| 115 ] |
| 116 outputs = [ |
| 117 "{{bundle_resources_dir}}/{{source_file_part}}", |
| 118 ] |
| 119 } |
OLD | NEW |