| # Copyright 2015 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//dart/sdk/lib/rules.gni") |
| import("//flutter/build/dart/rules.gni") |
| import("//flutter/lib/ui/dart_ui.gni") |
| import("//flutter/sky/engine/core/core.gni") |
| |
| if (!is_fuchsia) { |
| copy("copy_sky_engine_authors") { |
| sources = [ |
| "//AUTHORS", |
| ] |
| |
| outputs = [ |
| "$root_gen_dir/dart-pkg/sky_engine/{{source_file_part}}", |
| ] |
| } |
| } |
| |
| dart_sdk_lib_copy("async") { |
| sdk_lib_name = "async" |
| destination = "$root_gen_dir/dart-pkg/sky_engine/lib" |
| } |
| |
| dart_sdk_lib_copy("collection") { |
| sdk_lib_name = "collection" |
| destination = "$root_gen_dir/dart-pkg/sky_engine/lib" |
| } |
| |
| dart_sdk_lib_copy("convert") { |
| sdk_lib_name = "convert" |
| destination = "$root_gen_dir/dart-pkg/sky_engine/lib" |
| } |
| |
| dart_sdk_lib_copy("core") { |
| sdk_lib_name = "core" |
| destination = "$root_gen_dir/dart-pkg/sky_engine/lib" |
| } |
| |
| dart_sdk_lib_copy("developer") { |
| sdk_lib_name = "developer" |
| destination = "$root_gen_dir/dart-pkg/sky_engine/lib" |
| } |
| |
| dart_sdk_lib_copy("internal") { |
| sdk_lib_name = "internal" |
| destination = "$root_gen_dir/dart-pkg/sky_engine/lib" |
| } |
| |
| dart_sdk_lib_copy("io") { |
| sdk_lib_name = "io" |
| destination = "$root_gen_dir/dart-pkg/sky_engine/lib" |
| } |
| |
| dart_sdk_lib_copy("isolate") { |
| sdk_lib_name = "isolate" |
| destination = "$root_gen_dir/dart-pkg/sky_engine/lib" |
| } |
| |
| dart_sdk_lib_copy("math") { |
| sdk_lib_name = "math" |
| destination = "$root_gen_dir/dart-pkg/sky_engine/lib" |
| } |
| |
| dart_sdk_lib_copy("typed_data") { |
| sdk_lib_name = "typed_data" |
| destination = "$root_gen_dir/dart-pkg/sky_engine/lib" |
| } |
| |
| copy("copy_dart_ui") { |
| sources = dart_ui_files |
| |
| outputs = [ |
| "$root_gen_dir/dart-pkg/sky_engine/lib/ui/{{source_file_part}}", |
| ] |
| } |
| |
| group("copy_dart_sdk") { |
| deps = [ |
| ":async", |
| ":collection", |
| ":convert", |
| ":core", |
| ":developer", |
| ":internal", |
| ":io", |
| ":isolate", |
| ":math", |
| ":typed_data", |
| ] |
| } |
| |
| dart_pkg("sky_engine") { |
| sources = [ |
| "LICENSE", |
| "README.md", |
| "lib/_embedder.yaml", |
| "lib/_empty.dart", |
| "pubspec.yaml", |
| ] |
| |
| deps = [ |
| ":copy_dart_sdk", |
| ":copy_dart_ui", |
| ] |
| |
| if (!is_fuchsia) { |
| deps += [ ":copy_sky_engine_authors" ] |
| } |
| |
| service_isolate_dir = "//dart/runtime/bin/vmservice" |
| sdk_ext_directory = "$root_gen_dir/sky/bindings" |
| sdk_ext_files = [ |
| "$service_isolate_dir/vmservice_io.dart", |
| "$service_isolate_dir/loader.dart", |
| "$service_isolate_dir/server.dart", |
| ] |
| } |
| |
| if (is_fuchsia) { |
| import("//build/dart/dart_package.gni") |
| |
| dart_package("sky_engine_dart") { |
| package_name = "sky_engine" |
| |
| source_dir = rebase_path("$root_gen_dir/dart-pkg/sky_engine/lib") |
| |
| disable_analysis = true |
| |
| non_dart_deps = [ |
| # This will ensure all the source files needed for this package are |
| # copied to the right location. |
| ":sky_engine", |
| ] |
| } |
| } |