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

Unified Diff: sky/apk/rules.gni

Issue 1222673003: Add skyx packages for all the Sky demos (except game) (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: re-upload 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/build/skyx.gni » ('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 27715b81ba72d08cf58f218865cf67ceef1b3b13..1dbd905d5532cc181ffe314075ecd768cdae91d9 100644
--- a/sky/apk/rules.gni
+++ b/sky/apk/rules.gni
@@ -4,17 +4,7 @@
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"
+import("//sky/build/skyx.gni")
template("sky_apk") {
android_apk(target_name) {
@@ -34,74 +24,16 @@ template("sky_apk") {
}
template("sky_app") {
- # Note: org.domokit.sky.shell.SkyApplication knows about 'snapshot_blob.bin'.
- snapshot = "$target_gen_dir/snapshot_blob.bin"
-
- action("gen_snapshot") {
+ skyx("app") {
main_dart = invoker.main_dart
- inputs = [
- main_dart,
- ]
- outputs = [
- snapshot,
- ]
-
- sky_packager_dir =
- get_label_info("//sky/tools/packager($host_toolchain)", "root_out_dir")
-
- script = "//sky/tools/sky_packager.py"
-
- src_dir = "//"
- cwd = rebase_path(src_dir, root_build_dir)
-
- args = [
- rebase_path("$sky_packager_dir/sky_packager", src_dir),
- rebase_path(main_dart, src_dir),
- "--package-root",
- rebase_path(package_root, src_dir),
- "--snapshot",
- rebase_path(snapshot, src_dir),
- "-C",
- cwd,
- ]
-
- deps = [
- "//sky/tools/packager($host_toolchain)",
- "//sky/sdk",
- ]
- }
-
- 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),
- ]
+ if (defined(invoker.manifest)) {
+ manifest = invoker.manifest
+ }
- deps = [
- ":gen_snapshot",
- ]
+ if (defined(invoker.sources)) {
+ sources = invoker.sources
+ }
}
copy_ex("assets") {
@@ -111,14 +43,13 @@ template("sky_app") {
sources = [
"$root_build_dir/icudtl.dat",
]
-
deps = [
"//third_party/icu",
]
if (enable_skyx) {
- sources += [ app_bundle ]
- deps += [ ":gen_bundle" ]
+ sources += [ "$target_gen_dir/app.skyx" ]
+ deps += [ ":app" ]
}
}
« no previous file with comments | « no previous file | sky/build/skyx.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698