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

Unified Diff: sky/apk/rules.gni

Issue 1221203002: Add a flag for building skyx packages (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/sdk/example/mine_digger/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/apk/rules.gni
diff --git a/sky/apk/rules.gni b/sky/apk/rules.gni
index 87d59a40a4f9baf70554d4d93ede06ab55b25f13..27715b81ba72d08cf58f218865cf67ceef1b3b13 100644
--- a/sky/apk/rules.gni
+++ b/sky/apk/rules.gni
@@ -5,6 +5,15 @@
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
+declare_args() {
+ # Controls whether we build app.skyx bundles in the sky_app template below.
+ # An app.skyx bundle contains all the code an resources needed to run a Sky
+ # app offline. Unfortunately, we don't yet have all the Dart packages we need
+ # to create skyx packages installed on the build bots, so this functionality
+ # is currently disabled. This flag allows for local testing of this feature.
+ enable_skyx = false
+}
+
package_root = "$root_gen_dir/dart-pkg/packages"
template("sky_apk") {
@@ -63,38 +72,36 @@ template("sky_app") {
]
}
- if (defined(invoker.sky_yaml)) {
- app_bundle = "$target_gen_dir/${target_name}.skyx"
-
- action("gen_bundle") {
- asset_base = "$package_root/sky/assets/material-design-icons"
- sky_yaml = invoker.sky_yaml
-
- sources = [
- sky_yaml,
- snapshot,
- ]
-
- outputs = [
- app_bundle,
- ]
-
- script = "//sky/tools/skyx.py"
-
- args = [
- rebase_path(sky_yaml, root_build_dir),
- "--asset-base",
- rebase_path(asset_base, root_build_dir),
- "--snapshot",
- rebase_path(snapshot, root_build_dir),
- "-o",
- rebase_path(app_bundle, root_build_dir),
- ]
-
- deps = [
- ":gen_snapshot",
- ]
- }
+ app_bundle = "$target_gen_dir/app.skyx"
+
+ action("gen_bundle") {
+ asset_base = "$package_root/sky/assets/material-design-icons"
+ sky_yaml = invoker.sky_yaml
+
+ sources = [
+ "//sky/tools/skyx/bin/skyx.dart",
+ sky_yaml,
+ snapshot,
+ ]
+
+ outputs = [
+ app_bundle,
+ ]
+
+ script = "//sky/tools/skyx.py"
+ args = [
+ "--asset-base",
+ rebase_path(asset_base, root_build_dir),
+ "--snapshot",
+ rebase_path(snapshot, root_build_dir),
+ "-o",
+ rebase_path(app_bundle, root_build_dir),
+ rebase_path(sky_yaml, root_build_dir),
+ ]
+
+ deps = [
+ ":gen_snapshot",
+ ]
}
copy_ex("assets") {
@@ -103,12 +110,16 @@ template("sky_app") {
sources = [
"$root_build_dir/icudtl.dat",
- "$target_gen_dir/snapshot_blob.bin",
]
deps = [
"//third_party/icu",
]
+
+ if (enable_skyx) {
+ sources += [ app_bundle ]
+ deps += [ ":gen_bundle" ]
+ }
}
android_apk(target_name) {
@@ -124,7 +135,6 @@ template("sky_app") {
"//sky/shell:java",
"//sky/shell:sky_shell",
":assets",
- ":gen_snapshot",
]
if (defined(invoker.deps)) {
« no previous file with comments | « no previous file | sky/sdk/example/mine_digger/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698