Skip to content

Commit

Permalink
Move example out of sky/packages to //examples
Browse files Browse the repository at this point in the history
  • Loading branch information
iansf committed Aug 8, 2015
1 parent b281ad4 commit 3c8291a
Show file tree
Hide file tree
Showing 181 changed files with 69 additions and 62 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ Thumbs.db
/tools/grit/

# dart packages directories and related.
/examples/**/packages
/examples/**/pubspec.lock
/mojo/dart/apptest/packages
/mojo/dart/mojo_services/packages
/mojo/dart/mojo_services/pubspec.lock
/mojo/dart/mojom/bin/packages
/mojo/dart/mojom/packages
/mojo/dart/mojom/test/packages

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ target. Building on MacOS for Android, iOS, and a head-less MacOS target is comi
* (Only the first time) `sudo ./build/install-build-deps-android.sh`
* `./sky/tools/gn --android`
* `ninja -C out/android_Debug`
* `./sky/tools/shelldb start out/android_Debug/ sky/packages/sky/example/hello_world/lib/main.dart`
* `./sky/tools/shelldb start out/android_Debug/ examples/hello_world/lib/main.dart`

### Desktop (Mac and Linux)

Expand Down
2 changes: 1 addition & 1 deletion build/config/ios/ios_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def Main():
help='Path to the simulator application.')

parser.add_argument('-t', dest='target', required=False,
default='sky/packages/sky/example/demo_launcher/lib/main.dart',
default='examples/demo_launcher/lib/main.dart',
help='Sky server-relative path to the Sky app to run.')

parser.add_argument('-s', dest='server', required=False,
Expand Down
17 changes: 17 additions & 0 deletions examples/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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.

group("examples") {
testonly = true

deps = [
"//examples/demo_launcher",
"//examples/fitness",
"//examples/game",
"//examples/mine_digger",
"//examples/rendering",
"//examples/stocks",
"//examples/widgets",
]
}
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions examples/demo_launcher/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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("//sky/build/sky_app.gni")

sky_app("demo_launcher") {
main_dart = "lib/main.dart"
manifest = "sky.yaml"

if (is_android) {
apk_name = "SkyDemo"

bundles = [
"//examples/fitness",
"//examples/game",
"//examples/mine_digger",
"//examples/rendering:interactive_flex",
"//examples/stocks",
"//examples/widgets:cards",
]

deps = [
"//examples/demo_launcher/apk:java",
"//examples/demo_launcher/apk:resources",
]
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
sky_tools: any
dependency_overrides:
material_design_icons:
path: ../../../material_design_icons
path: ../../sky/packages/material_design_icons
sky:
path: ../../../sky
path: ../../sky/packages/sky
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sky_app("fitness") {
apk_name = "Fitness"

deps = [
"//sky/packages/sky/example/fitness/apk:resources",
"//examples/fitness/apk:resources",
]
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sky_app("game") {
apk_name = "Asteroids"

deps = [
"//sky/packages/sky/example/game/apk:resources",
"//examples/game/apk:resources",
]
} else if (is_ios) {
info_plist = "ios/Info.plist"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const _kChunkCount = 30;
String _urlToFetch(int chunk) {
if (rootBundle == null)
return '../data/stock_data_${chunk}.json';
return 'https://domokit.github.io/example/stocks/data/stock_data_${chunk}.json';
return 'https://domokit.github.io/examples/stocks/data/stock_data_${chunk}.json';
}

class StockDataFetcher {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions sky/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ group("sky") {
deps = [
"//sky/engine/platform:platform_unittests($host_toolchain)",
"//sky/engine/wtf:unittests($host_toolchain)",
"//sky/packages/sky/example",
"//examples",
"//sky/tools/imagediff($host_toolchain)",
"//sky/tools/sky_snapshot($host_toolchain)",
":sky_dev",
Expand All @@ -24,7 +24,7 @@ group("sky_dev") {

deps = [
"//sky/packages",
"//sky/packages/sky/example/demo_launcher",
"//examples/demo_launcher",
"//sky/shell",
]

Expand Down
2 changes: 1 addition & 1 deletion sky/packages/sky/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@ Building a standalone APK
Although it is possible to build a standalone APK containing your application,
doing so right now is difficult. If you're feeling brave, you can see how we
build the `Stocks.apk` in
[example/stocks](https://github.com/domokit/sky_engine/tree/master/sky/packages/sky/example/stocks).
[examples/stocks](https://github.com/domokit/sky_engine/tree/master/examples/stocks).
Eventually we plan to make this much easier and support platforms other than
Android, but that work still in progress.
17 changes: 0 additions & 17 deletions sky/packages/sky/example/BUILD.gn

This file was deleted.

28 changes: 0 additions & 28 deletions sky/packages/sky/example/demo_launcher/BUILD.gn

This file was deleted.

4 changes: 2 additions & 2 deletions sky/tests/examples/stocks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import 'dart:async';

import 'package:sky/widgets/framework.dart';

import '../../packages/sky/example/stocks/lib/main.dart';
import '../../packages/sky/example/stocks/lib/stock_data.dart';
import '../../../examples/stocks/lib/main.dart';
import '../../../examples/stocks/lib/stock_data.dart';
import '../resources/display_list.dart';

class TestStocksApp extends StocksApp {
Expand Down
2 changes: 1 addition & 1 deletion sky/tools/roll_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
]

MANIFESTS = [
'sky/packages/sky/example/demo_launcher/apk/AndroidManifest.xml',
'examples/demo_launcher/apk/AndroidManifest.xml',
]

MANIFEST_PREFACE = '''<?xml version="1.0" encoding="utf-8"?>
Expand Down
8 changes: 7 additions & 1 deletion sky/tools/skypy/skyserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
DART_SDK = os.path.join(SRC_ROOT, 'third_party', 'dart-sdk', 'dart-sdk', 'bin')
PUB = os.path.join(DART_SDK, 'pub')
PUB_CACHE = os.path.join(SRC_ROOT, "dart-pub-cache")
EXAMPLES_ROOT = os.path.join(SRC_ROOT, 'examples')
SKY_ROOT = os.path.join(SRC_ROOT, 'sky')

class SkyServer(object):
Expand All @@ -37,7 +38,12 @@ def start(self):

env = os.environ.copy()
env["PUB_CACHE"] = PUB_CACHE
args = [PUB, 'run', 'sky_tools:sky_server', '--route=/sky,%s' % SKY_ROOT, str(self.port)]
args = [PUB,
'run',
'sky_tools:sky_server',
'--route=/sky,%s' % SKY_ROOT,
'--route=/examples,%s' % EXAMPLES_ROOT,
str(self.port)]
self.server = subprocess.Popen(args, cwd=WORKBENCH_ROOT, env=env)
return self.server.pid

Expand Down
2 changes: 1 addition & 1 deletion sky/tools/webkitpy/layout_tests/run_webkit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def run_analyzer(port, options, args, logging_stream):
sky_tools_dir = os.path.dirname(os.path.dirname(test_dir))
analyzer_path = os.path.join(sky_tools_dir, 'skyanalyzer')
src_dir = os.path.dirname(os.path.dirname(sky_tools_dir))
analyzer_target_path = os.path.join(src_dir, 'sky/packages/sky/example/stocks/lib/main.dart')
analyzer_target_path = os.path.join(src_dir, 'examples/stocks/lib/main.dart')
analyzer_args = [
analyzer_path,
analyzer_target_path
Expand Down
2 changes: 1 addition & 1 deletion travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -ex

./sky/tools/gn --release
ninja -j 4 -C out/Release
./sky/tools/skyanalyzer --congratulate sky/packages/sky/example/stocks/lib/main.dart
./sky/tools/skyanalyzer --congratulate ../../../examples/stocks/lib/main.dart

0 comments on commit 3c8291a

Please sign in to comment.