Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: sky/apk/rules.gni

Issue 1211253004: Add MineDigger.apk that works offline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: one more examples Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/BUILD.gn ('k') | sky/sdk/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/android/rules.gni") 6 import("//build/config/android/rules.gni")
7 7
8 template("sky_apk") { 8 template("sky_apk") {
9 android_apk(target_name) { 9 android_apk(target_name) {
10 apk_name = invoker.apk_name 10 apk_name = invoker.apk_name
11 android_manifest = invoker.android_manifest 11 android_manifest = invoker.android_manifest
12 12
13 native_libs = [ "libsky_shell.so" ] 13 native_libs = [ "libsky_shell.so" ]
14 asset_location = "$root_build_dir/sky_shell/assets" 14 asset_location = "$root_build_dir/sky_shell/assets"
15 15
16 deps = [ 16 deps = [
17 "//base:base_java", 17 "//base:base_java",
18 "//sky/shell:assets", 18 "//sky/shell:assets",
19 "//sky/shell:java", 19 "//sky/shell:java",
20 "//sky/shell:sky_shell", 20 "//sky/shell:sky_shell",
21 ] + invoker.deps 21 ] + invoker.deps
22 } 22 }
23 } 23 }
24
25 template("sky_app") {
26 action("gen_snapshot") {
27 main_dart = invoker.main_dart
28 package_root = "$root_gen_dir/dart-pkg/packages"
29
30 # Note: org.chromium.base.ResourceExtractor knows about 'snapshot_blob.bin'.
31 snapshot = "$target_gen_dir/snapshot_blob.bin"
32
33 inputs = [
34 main_dart,
35 ]
36 outputs = [
37 snapshot,
38 ]
39
40 sky_packager_dir =
41 get_label_info("//sky/tools/packager($host_toolchain)", "root_out_dir")
42
43 script = "//sky/tools/sky_packager.py"
44
45 src_dir = "//"
46 cwd = rebase_path(src_dir, root_build_dir)
47
48 args = [
49 rebase_path("$sky_packager_dir/sky_packager", src_dir),
50 rebase_path(main_dart, src_dir),
51 "--package-root",
52 rebase_path(package_root, src_dir),
53 "--snapshot",
54 rebase_path(snapshot, src_dir),
55 "-C",
56 cwd,
57 ]
58
59 deps = [
60 "//sky/tools/packager($host_toolchain)",
61 "//sky/sdk",
62 ]
63 }
64
65 copy_ex("assets") {
66 clear_dir = true
67 dest = "$target_gen_dir/assets"
68
69 sources = [
70 "$root_build_dir/icudtl.dat",
71 "$target_gen_dir/snapshot_blob.bin",
72 ]
73
74 deps = [
75 "//third_party/icu",
76 ]
77 }
78
79 android_apk(target_name) {
80 apk_name = invoker.apk_name
81 android_manifest = "apk/AndroidManifest.xml"
82
83 native_libs = [ "libsky_shell.so" ]
84 asset_location = "$target_gen_dir/assets"
85
86 deps = [
87 "//base:base_java",
88 "//sky/shell:assets",
89 "//sky/shell:java",
90 "//sky/shell:sky_shell",
91 ":assets",
92 ":gen_snapshot",
93 ]
94
95 if (defined(invoker.deps)) {
96 deps += invoker.deps
97 }
98 }
99 }
OLDNEW
« no previous file with comments | « sky/BUILD.gn ('k') | sky/sdk/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698