提交 330f002b 编写于 作者: A Adam Barth

Update Stocks.apk build tech

Instead of having a one-off //sky/apk/stocks, we now use the |sky_app| GN
template to create Stocks.apk directly from //sky/sdk/example/stocks.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1211883004.
上级 ce5baf1e
......@@ -18,10 +18,6 @@ group("sky") {
":sky_apk",
]
if (is_android) {
deps += [ "//sky/apk/stocks" ]
}
if (!is_android) {
deps += [ "//third_party/mesa:osmesa" ]
}
......
// 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.
package org.domokit.stocks;
import android.os.Bundle;
import org.domokit.sky.shell.SkyActivity;
/**
* Main activity for Stocks.
*/
public class StocksActivity extends SkyActivity {
/**
* @see android.app.Activity#onCreate(android.os.Bundle)
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
loadUrl("https://domokit.github.io/sky/sdk/example/stocks/index.sky");
}
}
......@@ -187,7 +187,7 @@ Although it is possible to bundle the Sky Engine in your own app (instead of
running your code inside SkyDemo.apk), right now doing so is difficult.
There is one example of doing so if you're feeling brave:
https://github.com/domokit/mojo/tree/master/sky/apk/stocks
https://github.com/domokit/mojo/tree/master/sky/sdk/example/stocks
Eventually we plan to make this much easier and support platforms other than
Android, but that work is yet in progress.
......
......@@ -8,6 +8,9 @@ group("example") {
deps = []
if (is_android) {
deps += [ "//sky/sdk/example/mine_digger" ]
deps += [
"//sky/sdk/example/mine_digger",
"//sky/sdk/example/stocks",
]
}
}
......@@ -4,22 +4,9 @@
assert(is_android)
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//sky/apk/rules.gni")
android_library("java") {
java_files = [ "org/domokit/stocks/StocksActivity.java" ]
deps = [
"//sky/shell:java",
]
}
sky_apk("stocks") {
sky_app("stocks") {
apk_name = "Stocks"
android_manifest = "AndroidManifest.xml"
deps = [
":java",
]
main_dart = "lib/main.dart"
}
......@@ -10,7 +10,7 @@
<uses-permission android:name="android.permission.INTERNET"/>
<application android:name="org.domokit.sky.shell.SkyApplication" android:label="Stocks">
<activity android:name="StocksActivity"
<activity android:name="org.domokit.sky.shell.SkyActivity"
android:launchMode="singleTask"
android:theme="@android:style/Theme.Holo.Light.NoActionBar"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册