diff --git a/BUILD.gn b/BUILD.gn index 68cd9868b9c..a6119d8351e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -18,10 +18,6 @@ group("sky") { ":sky_apk", ] - if (is_android) { - deps += [ "//sky/apk/stocks" ] - } - if (!is_android) { deps += [ "//third_party/mesa:osmesa" ] } diff --git a/apk/stocks/BUILD.gn b/apk/stocks/BUILD.gn deleted file mode 100644 index 1f5fd25dd7c..00000000000 --- a/apk/stocks/BUILD.gn +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - -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") { - apk_name = "Stocks" - android_manifest = "AndroidManifest.xml" - deps = [ - ":java", - ] -} diff --git a/apk/stocks/org/domokit/stocks/StocksActivity.java b/apk/stocks/org/domokit/stocks/StocksActivity.java deleted file mode 100644 index 9e60afe6415..00000000000 --- a/apk/stocks/org/domokit/stocks/StocksActivity.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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"); - } -} diff --git a/sdk/README.md b/sdk/README.md index 023c9dae6c7..fbdfb7706d9 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -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. diff --git a/sdk/example/BUILD.gn b/sdk/example/BUILD.gn index d8769a62a31..bb037c8bad9 100644 --- a/sdk/example/BUILD.gn +++ b/sdk/example/BUILD.gn @@ -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", + ] } } diff --git a/sdk/example/stocks/BUILD.gn b/sdk/example/stocks/BUILD.gn new file mode 100644 index 00000000000..ae7db76aa51 --- /dev/null +++ b/sdk/example/stocks/BUILD.gn @@ -0,0 +1,12 @@ +# 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. + +assert(is_android) + +import("//sky/apk/rules.gni") + +sky_app("stocks") { + apk_name = "Stocks" + main_dart = "lib/main.dart" +} diff --git a/apk/stocks/AndroidManifest.xml b/sdk/example/stocks/apk/AndroidManifest.xml similarity index 94% rename from apk/stocks/AndroidManifest.xml rename to sdk/example/stocks/apk/AndroidManifest.xml index 52b3ccd3155..70dca9a9b46 100644 --- a/apk/stocks/AndroidManifest.xml +++ b/sdk/example/stocks/apk/AndroidManifest.xml @@ -10,7 +10,7 @@ -