Make SkyDemo.apk start offline

Offline support isn't complete, but after this CL, SkyDemo.apk is able to start
and show some UI offline.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1225883002.
This commit is contained in:
Adam Barth 2015-07-06 16:17:04 -07:00
parent 719ec1ee61
commit cc8f3947ff
2 changed files with 58 additions and 4 deletions

View File

@ -30,10 +30,7 @@ group("sky_apk") {
]
if (is_android) {
deps += [
"//sky/apk/demo",
"//sky/services/intents",
]
deps += [ "//sky/services/intents" ]
}
if (is_linux) {

View File

@ -0,0 +1,57 @@
# 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.
import("//build/config/android/rules.gni")
import("//sky/build/skyx.gni")
template("sky_app") {
skyx("app") {
main_dart = invoker.main_dart
if (defined(invoker.manifest)) {
manifest = invoker.manifest
}
if (defined(invoker.sources)) {
sources = invoker.sources
}
}
copy_ex("assets") {
clear_dir = true
dest = "$target_gen_dir/assets"
sources = [
"$root_build_dir/icudtl.dat",
]
deps = [
"//third_party/icu",
]
if (enable_skyx) {
sources += [ "$target_gen_dir/app.skyx" ]
deps += [ ":app" ]
}
}
android_apk(target_name) {
apk_name = invoker.apk_name
android_manifest = "apk/AndroidManifest.xml"
native_libs = [ "libsky_shell.so" ]
asset_location = "$target_gen_dir/assets"
deps = [
"//base:base_java",
"//sky/shell:assets",
"//sky/shell:java",
"//sky/shell:sky_shell",
":assets",
]
if (defined(invoker.deps)) {
deps += invoker.deps
}
}
}