diff --git a/build/archives/BUILD.gn b/build/archives/BUILD.gn index 5530c63784689..002bbeabada90 100644 --- a/build/archives/BUILD.gn +++ b/build/archives/BUILD.gn @@ -26,12 +26,10 @@ if (build_engine_artifacts && !is_android) { deps = [ "//flutter/flutter_frontend_server:frontend_server", "//flutter/impeller/compiler:impellerc", - "//flutter/impeller/compiler:impellerc_license", "//flutter/impeller/tessellator:tessellator_shared", "//flutter/lib/snapshot:generate_snapshot_bin", "//flutter/shell/testing:testing", "//flutter/tools/path_ops:path_ops", - "//flutter/tools/path_ops:path_ops_license", "//third_party/dart/runtime/bin:gen_snapshot", ] if (is_mac) { @@ -81,16 +79,6 @@ if (build_engine_artifacts && !is_android) { source = "$root_out_dir/flutter_tester$exe" destination = "flutter_tester$exe" }, - { - source = - "$root_out_dir/gen/flutter/impeller/compiler/LICENSE.impellerc.md" - destination = "LICENSE.impellerc.md" - }, - { - source = - "$root_out_dir/gen/flutter/tools/path_ops/LICENSE.path_ops.md" - destination = "LICENSE.path_ops.md" - }, { source = "$root_out_dir/impellerc$exe" destination = "impellerc$exe" diff --git a/build/zip_bundle.gni b/build/zip_bundle.gni index 034aaba76da45..cdc9b2d812902 100644 --- a/build/zip_bundle.gni +++ b/build/zip_bundle.gni @@ -3,6 +3,7 @@ # found in the LICENSE file. import("//flutter/common/config.gni") +import("//flutter/shell/version/version.gni") if (flutter_runtime_mode == "jit_release") { android_zip_archive_dir = "android-$target_cpu-jit-release" @@ -38,16 +39,41 @@ if (flutter_runtime_mode == "jit_release") { template("zip_bundle") { assert(defined(invoker.output), "output must be defined") assert(defined(invoker.files), "files must be defined as a list of scopes") + + license_readme = "$target_gen_dir/LICENSE.$target_name.md" + license_target = "_${target_name}_license_md" + + generated_file(license_target) { + source_path = rebase_path(".", "//flutter") + license_path = + rebase_path("//flutter/sky/packages/sky_engine/LICENSE", "//flutter") + git_url = "https://github.com/flutter/engine/tree/$engine_version" + sky_engine_url = "https://storage.googleapis.com/flutter_infra_release/flutter/$engine_version/sky_engine.zip" + outputs = [ license_readme ] + contents = [ + "# $target_name", + "", + "This bundle is part of the the Flutter SDK.", + "", + "The source code is hosted at [flutter/engine/$source_path]($git_url/$source_path).", + "The license for this bundle is hosted at [flutter/engine/sky/packages/sky_engine/LICENSE]($git_url/$license_path) ", + "and [sky_engine.zip]($sky_engine_url).", + ] + } + action(target_name) { script = "//flutter/build/zip.py" outputs = [ "$root_build_dir/zip_archives/${invoker.output}" ] - sources = [] + sources = [ license_readme ] forward_variables_from(invoker, [ "visibility" ]) - deps = invoker.deps + deps = [ ":$license_target" ] + invoker.deps args = [ "-o", rebase_path(outputs[0]), + "-i", + rebase_path(license_readme), + "LICENSE.$target_name.md", ] foreach(input, invoker.files) { args += [ diff --git a/impeller/compiler/BUILD.gn b/impeller/compiler/BUILD.gn index 788248f5b1b05..60b624133e74d 100644 --- a/impeller/compiler/BUILD.gn +++ b/impeller/compiler/BUILD.gn @@ -72,26 +72,6 @@ impeller_component("compiler_lib") { ] } -generated_file("impellerc_license") { - source_path = rebase_path(".", "//flutter") - git_url = "https://github.com/flutter/engine/tree/$engine_version" - outputs = [ "$target_gen_dir/LICENSE.impellerc.md" ] - contents = [ - "# impellerc", - "", - "This tool is used by the Flutter SDK to compile shaders.", - "", - "Source code for this tool: [flutter/engine/$source_path]($git_url/$source_path).", - "", - "## Licenses", - "", - "### impellerc", - "", - read_file("//flutter/sky/packages/sky_engine/LICENSE", "string"), - "", - ] -} - impeller_component("impellerc") { target_type = "executable" @@ -108,10 +88,7 @@ impeller_component("impellerc") { } group("compiler") { - deps = [ - ":impellerc", - ":impellerc_license", - ] + deps = [ ":impellerc" ] } impeller_component("compiler_unittests") { diff --git a/tools/font-subset/BUILD.gn b/tools/font-subset/BUILD.gn index 880769d4d75fc..db8fd7f434fc5 100644 --- a/tools/font-subset/BUILD.gn +++ b/tools/font-subset/BUILD.gn @@ -3,7 +3,6 @@ # found in the LICENSE file. import("//flutter/build/zip_bundle.gni") -import("//flutter/shell/version/version.gni") executable("_font-subset") { output_name = "font-subset" @@ -28,22 +27,6 @@ executable("_font-subset") { } } -generated_file("_font-subset-license") { - source_path = rebase_path(".", "//flutter") - license_path = - rebase_path("//flutter/sky/packages/sky_engine/LICENSE", "//flutter") - git_url = "https://github.com/flutter/engine/tree/$engine_version" - outputs = [ "$target_gen_dir/LICENSE.font-subset.md" ] - contents = [ - "# font-subset", - "", - "This tool is used by the Flutter SDK to tree shake icon fonts.", - "", - "Source code for this tool: [flutter/engine/$source_path]($git_url/$source_path).", - "License for this tool: [flutter/engine/sky/packages/sky_engine/LICENSE]($git_url/$license_path).", - ] -} - generated_file("font_entitlement_config") { outputs = [ "$target_gen_dir/font_subset_without_entitlements.txt" ] @@ -75,15 +58,10 @@ zip_bundle("font-subset") { source = "$root_gen_dir/const_finder.dart.snapshot" destination = "const_finder.dart.snapshot" }, - { - source = "$target_gen_dir/LICENSE.font-subset.md" - destination = "LICENSE.font-subset.md" - }, ] deps = [ ":_font-subset", - ":_font-subset-license", "//flutter/tools/const_finder", ] if (is_mac) { diff --git a/tools/path_ops/BUILD.gn b/tools/path_ops/BUILD.gn index 8871392db967b..cb711533dfbe4 100644 --- a/tools/path_ops/BUILD.gn +++ b/tools/path_ops/BUILD.gn @@ -4,38 +4,12 @@ import("//flutter/shell/version/version.gni") -generated_file("path_ops_license") { - source_path = rebase_path(".", "//flutter") - git_url = "https://github.com/flutter/engine/tree/$engine_version" - outputs = [ "$target_gen_dir/LICENSE.path_ops.md" ] - contents = [ - "# path_ops", - "", - "This tool is used by the vector_graphics library to calculate path intersections.", - "", - "Source code for this tool: [flutter/engine/$source_path]($git_url/$source_path).", - "", - "## Licenses", - "", - read_file("//flutter/sky/packages/sky_engine/LICENSE", "string"), - "", - "## Additional open source licenses", - "", - "### Skia", - "", - read_file("//third_party/skia/LICENSE", "string"), - ] -} - shared_library("path_ops") { sources = [ "path_ops.cc", "path_ops.h", ] - deps = [ - ":path_ops_license", - "//third_party/skia", - ] + deps = [ "//third_party/skia" ] metadata = { entitlement_file_path = [ "libpath_ops.dylib" ]