From fbf31015fdb1079621bf6b108c889a1f6a412a89 Mon Sep 17 00:00:00 2001 From: Xilai Zhang Date: Tue, 29 Nov 2022 10:24:21 -0800 Subject: [PATCH] [gn] embed mac codesign metadata in android artifacts (#37951) * add top level metadata for androids * add top level metadata for androids --- shell/platform/android/BUILD.gn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index d59de0d939715..2da0fe0e893f3 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -592,6 +592,12 @@ zip_bundle("android_javadoc") { deps = [ ":gen_android_javadoc" ] } +generated_file("android_entitlement_config") { + outputs = [ "$target_gen_dir/android_entitlements.txt" ] + contents = [ "gen_snapshot" ] + deps = [] +} + if (target_cpu != "x86") { zip_bundle("gen_snapshot") { gen_snapshot_bin = "gen_snapshot" @@ -647,6 +653,16 @@ if (target_cpu != "x86") { ] deps = [ "//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)" ] + + if (host_os == "mac") { + deps += [ ":android_entitlement_config" ] + files += [ + { + source = "$target_gen_dir/android_entitlements.txt" + destination = "entitlements.txt" + }, + ] + } } }