Skip to content

Commit

Permalink
Reland "[web] Add js_types sources to build." (flutter#40692)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshualitt authored Mar 28, 2023
1 parent 0b1c7c8 commit 709d86e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions sky/packages/sky_engine/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import("//flutter/lib/ui/dart_ui.gni")
import("//third_party/dart/sdk/lib/_http/http_sources.gni")
import(
"//third_party/dart/sdk/lib/_internal/js_runtime/interceptors_sources.gni")
import("//third_party/dart/sdk/lib/_internal/js_shared/js_types_sources.gni")
import("//third_party/dart/sdk/lib/async/async_sources.gni")
import("//third_party/dart/sdk/lib/collection/collection_sources.gni")
import("//third_party/dart/sdk/lib/convert/convert_sources.gni")
Expand All @@ -18,6 +19,7 @@ import("//third_party/dart/sdk/lib/html/html_sources.gni")
import("//third_party/dart/sdk/lib/internal/internal_sources.gni")
import("//third_party/dart/sdk/lib/io/io_sources.gni")
import("//third_party/dart/sdk/lib/isolate/isolate_sources.gni")
import("//third_party/dart/sdk/lib/js/js_annotations_sources.gni")
import("//third_party/dart/sdk/lib/js/js_sources.gni")
import("//third_party/dart/sdk/lib/js_interop/js_interop_sources.gni")
import("//third_party/dart/sdk/lib/js_util/js_util_sources.gni")
Expand Down Expand Up @@ -86,6 +88,19 @@ copy("_interceptors") {
]
}

copy("_js_annotations") {
lib_path = rebase_path("js", "", dart_sdk_lib_path)
sources = rebase_path(js_annotations_sdk_sources, "", lib_path)
outputs = [ "$root_gen_dir/dart-pkg/sky_engine/lib/_js_annotations/{{source_file_part}}" ]
}

copy("_js_types") {
lib_path = rebase_path("_internal/js_shared", "", dart_sdk_lib_path)
sources = rebase_path(js_types_sdk_sources, "", lib_path)
outputs =
[ "$root_gen_dir/dart-pkg/sky_engine/lib/_js_types/{{source_file_part}}" ]
}

copy("internal") {
lib_path = rebase_path("internal", "", dart_sdk_lib_path)
sources = rebase_path(internal_sdk_sources, "", lib_path)
Expand Down Expand Up @@ -180,6 +195,8 @@ group("copy_dart_sdk") {
deps = [
":_http",
":_interceptors",
":_js_annotations",
":_js_types",
":async",
":collection",
":convert",
Expand Down Expand Up @@ -230,6 +247,10 @@ generated_file("_embedder_yaml") {
" # public API, e.g. List being Iterable by virtue of implementing",
" # EfficientLengthIterable. Not including this library yields analysis errors.",
" \"dart:_internal\": \"internal/internal.dart\"",
" # The _js_annotations library is also needed for the same reasons as _internal.",
" \"dart:_js_annotations\": \"_js_annotations/_js_annotations.dart\"",
" # The _js_types library is also needed for the same reasons as _internal.",
" \"dart:_js_types\": \"_js_types/js_types.dart\"",
" \"dart:nativewrappers\": \"_empty.dart\"",
]
}
Expand Down
4 changes: 4 additions & 0 deletions sky/packages/sky_engine/lib/_embedder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ embedded_libs:
# public API, e.g. List being Iterable by virtue of implementing
# EfficientLengthIterable. Not including this library yields analysis errors.
"dart:_internal": "../../../../../third_party/dart/sdk/lib/internal/internal.dart"
# The _js_annotations library is also needed for the same reasons as _internal.
"dart:_js_annotations": "../../../../../third_party/dart/sdk/lib/js/_js_annotations.dart"
# The _js_types library is also needed for the same reasons as _internal.
"dart:_js_types": "../../../../../third_party/dart/sdk/lib/_internal/js_shared/lib/js_types.dart"
"dart:nativewrappers": "_empty.dart"

0 comments on commit 709d86e

Please sign in to comment.