Index: ios/chrome/share_extension/BUILD.gn |
diff --git a/ios/chrome/share_extension/BUILD.gn b/ios/chrome/share_extension/BUILD.gn |
index 148827185b647b5091b039a37be2fefce913522d..cba42d62a5ab0b3225b750bf9522ab9221342ad3 100644 |
--- a/ios/chrome/share_extension/BUILD.gn |
+++ b/ios/chrome/share_extension/BUILD.gn |
@@ -2,8 +2,14 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import("//build/config/ios/rules.gni") |
import("//build/config/locales.gni") |
+import("//build/config/mac/base_rules.gni") |
+import("//build/mac/tweak_info_plist.gni") |
+import("//ios/build/chrome_build.gni") |
import("//ios/chrome/extension_repack.gni") |
+import("//ios/chrome/tools/strings/generate_localizable_strings.gni") |
+import("//ios/public/provider/chrome/browser/build_config.gni") |
group("resources") { |
deps = [ |
@@ -16,3 +22,66 @@ extension_repack_all_locales("packed_resources") { |
input_locales = ios_packed_locales |
output_locales = ios_packed_locales_as_mac_outputs |
} |
+ |
+tweak_info_plist("tweak_info_plist") { |
+ info_plist = "Info.plist" |
+} |
+ |
+compile_plist("entitlements") { |
+ format = "xml1" |
+ substitutions = [ "IOS_BUNDLE_ID_PREFIX=$ios_app_bundle_id_prefix" ] |
+ output_name = "$target_gen_dir/share_extension.appex.entitlements" |
+ plist_templates = |
+ [ "entitlements/external/share_extension.appex.entitlements" ] + |
+ ios_chrome_entitlements_additions |
+} |
+ |
+ios_appex_bundle("share_extension") { |
+ sources = [ |
+ "share_extension_view.h", |
+ "share_extension_view.mm", |
+ "share_view_controller.h", |
+ "share_view_controller.mm", |
+ "ui_util.h", |
+ "ui_util.mm", |
+ ] |
+ |
+ configs += [ "//build/config/compiler:enable_arc" ] |
+ |
+ deps = [ |
+ ":system_strings", |
+ "//base", |
+ "//ios/chrome/common/app_group", |
+ "//ios/chrome/common/app_group:client", |
+ ] |
+ bundle_deps_filter = [ "//third_party/icu:icudata" ] |
+ |
+ libs = [ |
+ "Foundation.framework", |
+ "Social.framework", |
+ "CoreGraphics.framework", |
+ "MobileCoreServices.framework", |
+ "UIKit.framework", |
+ ] |
+ |
+ extra_substitutions = [ |
+ "CHROME_CHANNEL_SCHEME=$url_channel_scheme", |
+ "CHROMIUM_SHORT_NAME=$chromium_short_name", |
+ "SHARE_EXTENSION_BUNDLE_ID=$chromium_bundle_id.ShareExtension", |
+ ] |
+ |
+ entitlements_target = ":entitlements" |
+ info_plist_target = ":tweak_info_plist" |
+} |
+ |
+generate_localizable_strings("system_strings") { |
+ visibility = [ ":*" ] |
+ _packed_resources_target = "//ios/chrome/share_extension:packed_resources" |
+ config_file = "share_extension_localize_strings_config.plist" |
+ datapack_dir = get_label_info(_packed_resources_target, "target_gen_dir") |
+ packed_locales = ios_packed_locales_as_mac_outputs |
+ output_filenames = [ "Localizable.strings" ] |
+ deps = [ |
+ _packed_resources_target, |
+ ] |
+} |