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

Unified Diff: sky/apk/rules.gni

Issue 1216273002: Build stocks.skyx (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/stocks/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 5a5f9e10016dafa19a1796d0f92249de4d131985..7dfa21907e9d901877069d1c7ce54ebadb5c2e19 100644
--- a/sky/apk/rules.gni
+++ b/sky/apk/rules.gni
@@ -5,6 +5,8 @@
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
+package_root = "$root_gen_dir/dart-pkg/packages"
+
template("sky_apk") {
android_apk(target_name) {
apk_name = invoker.apk_name
@@ -23,12 +25,11 @@ template("sky_apk") {
}
template("sky_app") {
+ # Note: org.chromium.base.ResourceExtractor knows about 'snapshot_blob.bin'.
+ snapshot = "$target_gen_dir/snapshot_blob.bin"
+
action("gen_snapshot") {
main_dart = invoker.main_dart
- package_root = "$root_gen_dir/dart-pkg/packages"
-
- # Note: org.chromium.base.ResourceExtractor knows about 'snapshot_blob.bin'.
- snapshot = "$target_gen_dir/snapshot_blob.bin"
inputs = [
main_dart,
@@ -62,6 +63,40 @@ 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",
+ ]
+ }
+ }
+
copy_ex("assets") {
clear_dir = true
dest = "$target_gen_dir/assets"
@@ -92,6 +127,10 @@ template("sky_app") {
":gen_snapshot",
]
+ if (defined(invoker.sky_yaml)) {
+ deps += [ ":gen_bundle" ]
+ }
+
if (defined(invoker.deps)) {
deps += invoker.deps
}
« no previous file with comments | « no previous file | sky/sdk/example/stocks/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698