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

A
Adam Barth 已提交
7 8
if (!is_ios) {

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

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

    deps = [
27
      "//flutter/sky/shell",
28
    ]
A
Adam Barth 已提交
29
  } else {
30
    sources = [
31
      "$root_build_dir/flutter.mojo",
32
      "$root_build_dir/icudtl.dat",
33 34
      "$root_build_dir/sky_shell",
      "$root_build_dir/symbols/libflutter_library.so",
35 36 37
    ]

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

  outputs = [ "$root_dist_dir/shell/{{source_file_part}}" ]
}

A
Adam Barth 已提交
48 49
}  # if (!is_ios)

50
if (is_android) {
51
  action("sky_engine") {
52
    script = "//flutter/sky/tools/dist_dart_pkg.py"
53

54
    source = "$root_gen_dir/dart-pkg/sky_engine"
55
    dest = "$root_dist_dir/packages/sky_engine"
56 57 58 59 60 61 62 63 64

    inputs = [ source ]
    outputs = [ dest ]

    args = [
      "--source",
      rebase_path(source),
      "--dest",
      rebase_path(dest),
65
    ]
66

67
    deps = [
68
      "//flutter/sky/packages/sky_engine",
69 70 71
    ]
  }

72
  action("sky_services") {
73
    script = "//flutter/sky/tools/dist_dart_pkg.py"
74 75

    source = "$root_gen_dir/dart-pkg/sky_services"
76
    dest = "$root_dist_dir/packages/sky_services"
77 78 79 80 81 82 83 84 85

    inputs = [ source ]
    outputs = [ dest ]

    args = [
      "--source",
      rebase_path(source),
      "--dest",
      rebase_path(dest),
86
    ]
87

88
    deps = [
89
      "//flutter/sky/packages/sky_services",
90 91 92 93 94
    ]
  }
}

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

A
Adam Barth 已提交
97
  if (!flutter_aot && !is_ios) {
98 99
    deps += [ ":sky_shell" ]
  }
100 101

  if (is_android) {
102 103 104
    deps += [
      ":sky_engine",
      ":sky_services",
J
Jason Simmons 已提交
105
      "//build/android/ant:keystore",
106
    ]
107 108
  }
}