BUILD.gn 2.1 KB
Newer Older
1 2 3 4 5 6 7 8 9
# 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.

root_dist_dir = "$root_build_dir/dist"

copy("sky_shell") {
  if (is_android) {
    sources = [
A
Adam Barth 已提交
10
      "$root_build_dir/apks/SkyShell.apk",
11 12
      "$root_build_dir/flutter.mojo",
      "$root_build_dir/symbols/libflutter_library.so",
13 14 15
    ]

    deps = [
A
Adam Barth 已提交
16
      "//sky/shell",
17
      "//sky/shell/platform/mojo",
18
    ]
19
  } else if (is_mac) {
20
    sources = [
E
Eric Seidel 已提交
21
      "$root_build_dir/SkyShell.app",
22 23 24 25 26
    ]

    deps = [
      "//sky/shell:shell_struct",
    ]
27
  } else if(!is_ios) {
28
    sources = [
29
      "$root_build_dir/flutter.mojo",
30
      "$root_build_dir/icudtl.dat",
31 32
      "$root_build_dir/sky_shell",
      "$root_build_dir/symbols/libflutter_library.so",
33 34 35 36
    ]

    deps = [
      "//sky/shell",
37 38
      "//sky/shell/platform/mojo",
      "//sky/shell/platform/mojo",
A
Adam Barth 已提交
39
      "//third_party/icu:icudata",
40
    ]
41 42 43
  } else {
    sources = []
    deps = []
44 45
  }

46 47 48 49 50 51 52 53 54
  sky_snapshot_dir =
      get_label_info("//sky/tools/sky_snapshot($host_toolchain)", "root_out_dir")

  sources += [ "$sky_snapshot_dir/sky_snapshot" ]

  deps += [
    "//sky/tools/sky_snapshot($host_toolchain)",
  ]

55 56 57 58 59 60
  outputs = [ "$root_dist_dir/shell/{{source_file_part}}" ]
}

if (is_android) {
  import("//build/config/android/rules.gni")

61
  copy_ex("sky_engine") {
62
    clear_dir = true
63
    # Note: The package actually ends up in $root_dist_dir/packages/sky_engine/sky_engine
64
    dest = "$root_dist_dir/packages/sky_engine"
65
    sources = [
66
      "$root_gen_dir/dart-pkg/sky_engine",
67 68
    ]
    deps = [
69
      "//sky/packages/sky_engine",
70 71 72
    ]
  }

73 74 75 76
  copy_ex("sky_services") {
    clear_dir = true
    # Note: The package actually ends up in $root_dist_dir/packages/sky_services/sky_services
    dest = "$root_dist_dir/packages/sky_services"
77
    sources = [
78
      "$root_gen_dir/dart-pkg/sky_services",
79 80
    ]
    deps = [
81
      "//sky/packages/sky_services",
82 83 84 85 86 87
    ]
  }

}

group("dist") {
A
Adam Barth 已提交
88
  deps = []
89

90
  if (!is_ios && !is_mac) {
91 92
    deps += [ ":sky_shell" ]
  }
93 94

  if (is_android) {
95 96 97 98
    deps += [
      ":sky_engine",
      ":sky_services",
    ]
99 100
  }
}