From 0057c7ea8d1d4f51ee63579d12b1fa3672e1c7f2 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 20 Jun 2023 10:38:09 -0400 Subject: [PATCH] chore: delete old counter example, dart_bindings, and dart_cli (#35) * chore: delete old counter example * delete dart_bindings and dart_cli --- dart_bindings/.gitignore | 7 - dart_bindings/README.md | 6 - dart_bindings/analysis_options.yaml | 30 --- dart_bindings/lib/src/bindings.dart | 112 ---------- dart_bindings/lib/updater.dart | 108 ---------- dart_bindings/pubspec.yaml | 16 -- dart_cli/.gitignore | 4 - dart_cli/README.md | 1 - dart_cli/analysis_options.yaml | 30 --- dart_cli/bin/dart_cli.dart | 137 ------------ dart_cli/pubspec.yaml | 18 -- example/counter/.gitignore | 47 ---- example/counter/.metadata | 45 ---- example/counter/README.md | 16 -- example/counter/analysis_options.yaml | 29 --- example/counter/android/.gitignore | 13 -- example/counter/android/app/build.gradle | 71 ------ .../android/app/src/main/AndroidManifest.xml | 36 ---- .../com/example/counter/MainActivity.kt | 6 - .../res/drawable-v21/launch_background.xml | 12 -- .../main/res/drawable/launch_background.xml | 12 -- .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 544 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 442 -> 0 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 721 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 1031 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 1443 -> 0 bytes .../app/src/main/res/values-night/styles.xml | 18 -- .../app/src/main/res/values/styles.xml | 18 -- .../app/src/profile/AndroidManifest.xml | 8 - example/counter/android/build.gradle | 31 --- example/counter/android/gradle.properties | 3 - .../gradle/wrapper/gradle-wrapper.properties | 5 - example/counter/android/settings.gradle | 11 - example/counter/lib/main.dart | 162 -------------- example/counter/pubspec.lock | 203 ------------------ example/counter/pubspec.yaml | 92 -------- example/counter/shorebird.yaml | 1 - 37 files changed, 1308 deletions(-) delete mode 100644 dart_bindings/.gitignore delete mode 100644 dart_bindings/README.md delete mode 100644 dart_bindings/analysis_options.yaml delete mode 100644 dart_bindings/lib/src/bindings.dart delete mode 100644 dart_bindings/lib/updater.dart delete mode 100644 dart_bindings/pubspec.yaml delete mode 100644 dart_cli/.gitignore delete mode 100644 dart_cli/README.md delete mode 100644 dart_cli/analysis_options.yaml delete mode 100644 dart_cli/bin/dart_cli.dart delete mode 100644 dart_cli/pubspec.yaml delete mode 100644 example/counter/.gitignore delete mode 100644 example/counter/.metadata delete mode 100644 example/counter/README.md delete mode 100644 example/counter/analysis_options.yaml delete mode 100644 example/counter/android/.gitignore delete mode 100644 example/counter/android/app/build.gradle delete mode 100644 example/counter/android/app/src/main/AndroidManifest.xml delete mode 100644 example/counter/android/app/src/main/kotlin/com/example/counter/MainActivity.kt delete mode 100644 example/counter/android/app/src/main/res/drawable-v21/launch_background.xml delete mode 100644 example/counter/android/app/src/main/res/drawable/launch_background.xml delete mode 100644 example/counter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png delete mode 100644 example/counter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 example/counter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 example/counter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 example/counter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png delete mode 100644 example/counter/android/app/src/main/res/values-night/styles.xml delete mode 100644 example/counter/android/app/src/main/res/values/styles.xml delete mode 100644 example/counter/android/app/src/profile/AndroidManifest.xml delete mode 100644 example/counter/android/build.gradle delete mode 100644 example/counter/android/gradle.properties delete mode 100644 example/counter/android/gradle/wrapper/gradle-wrapper.properties delete mode 100644 example/counter/android/settings.gradle delete mode 100644 example/counter/lib/main.dart delete mode 100644 example/counter/pubspec.lock delete mode 100644 example/counter/pubspec.yaml delete mode 100644 example/counter/shorebird.yaml diff --git a/dart_bindings/.gitignore b/dart_bindings/.gitignore deleted file mode 100644 index 3cceda5..0000000 --- a/dart_bindings/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# https://dart.dev/guides/libraries/private-files -# Created by `dart pub` -.dart_tool/ - -# Avoid committing pubspec.lock for library packages; see -# https://dart.dev/guides/libraries/private-files#pubspeclock. -pubspec.lock diff --git a/dart_bindings/README.md b/dart_bindings/README.md deleted file mode 100644 index c0e9f83..0000000 --- a/dart_bindings/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# dart_bindings - -Dart bindings for the updater library. - -This presumably eventually either gets published to pub.dev, or more likely -ends up as dart:shorebird or something included with the Shorebird SDK. \ No newline at end of file diff --git a/dart_bindings/analysis_options.yaml b/dart_bindings/analysis_options.yaml deleted file mode 100644 index dee8927..0000000 --- a/dart_bindings/analysis_options.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. - -include: package:lints/recommended.yaml - -# Uncomment the following section to specify additional rules. - -# linter: -# rules: -# - camel_case_types - -# analyzer: -# exclude: -# - path/to/excluded/files/** - -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options diff --git a/dart_bindings/lib/src/bindings.dart b/dart_bindings/lib/src/bindings.dart deleted file mode 100644 index 6b8538e..0000000 --- a/dart_bindings/lib/src/bindings.dart +++ /dev/null @@ -1,112 +0,0 @@ -// This entire file could be easily autogenerated. -// Probably https://pub.dev/packages/ffigen would work. - -import 'dart:ffi' as ffi; - -import 'package:ffi/ffi.dart'; - -// This must be kept in sync with the C struct in updater.h. -// Including *in the same order* as the C struct. -class AppParameters extends ffi.Struct { - external ffi.Pointer channel; - // ignore: non_constant_identifier_names - external ffi.Pointer app_id; - // ignore: non_constant_identifier_names - external ffi.Pointer base_version; - // ignore: non_constant_identifier_names - external ffi.Pointer update_url; - // ignore: non_constant_identifier_names - external ffi.Pointer> original_libapp_paths; - @ffi.Int8() - // ignore: non_constant_identifier_names - external int original_libapp_paths_size; - // ignore: non_constant_identifier_names - external ffi.Pointer cache_dir; - - static ffi.Pointer allocate({ - required String appId, - required String version, - required String channel, - required String? updateUrl, - required List libappPaths, - required String libflutterPath, - required String cacheDir, - }) { - var config = calloc(); - config.ref.app_id = appId.toNativeUtf8(); - config.ref.base_version = version.toNativeUtf8(); - config.ref.channel = channel.toNativeUtf8(); - if (updateUrl != null) { - config.ref.update_url = updateUrl.toNativeUtf8(); - } - config.ref.original_libapp_paths = calloc>( - libappPaths.length, - ); - - for (var i = 0; i < libappPaths.length; i++) { - config.ref.original_libapp_paths[i] = libappPaths[i].toNativeUtf8(); - } - config.ref.cache_dir = cacheDir.toNativeUtf8(); - return config; - } - - static void free(ffi.Pointer config) { - calloc.free(config.ref.app_id); - calloc.free(config.ref.base_version); - calloc.free(config.ref.channel); - calloc.free(config.ref.update_url); - // Free all paths in original_libapp_path. - for (var i = 0; i < config.ref.original_libapp_paths_size; i++) { - calloc.free(config.ref.original_libapp_paths[i]); - } - calloc.free(config.ref.original_libapp_paths); - calloc.free(config.ref.cache_dir); - calloc.free(config); - } -} - -typedef _GetBoolFunc = ffi.Bool Function(); -typedef GetBool = bool Function(); - -typedef _GetStringFunc = ffi.Pointer Function(); -typedef GetString = ffi.Pointer Function(); - -typedef _GetVoidFunc = ffi.Void Function(); -typedef GetVoid = void Function(); - -typedef _SBInitFunc = ffi.Void Function(ffi.Pointer config); -typedef SBInit = void Function(ffi.Pointer config); - -typedef _FreeStringFunc = ffi.Void Function(ffi.Pointer str); -typedef FreeString = void Function(ffi.Pointer str); - -class UpdaterBindings { - final ffi.DynamicLibrary library; - - late SBInit init; - late GetBool checkForUpdate; - late GetString activeVersion; - late GetString activePath; - late FreeString freeString; - late GetVoid update; - - UpdaterBindings(this.library) { - // None of these call back into Dart, so they're all safely "isLeaf: true". - init = library.lookupFunction<_SBInitFunc, SBInit>('shorebird_init', - isLeaf: true); - activeVersion = library.lookupFunction<_GetStringFunc, GetString>( - 'shorebird_active_version', - isLeaf: true); - activePath = library.lookupFunction<_GetStringFunc, GetString>( - 'shorebird_active_path', - isLeaf: true); - freeString = library.lookupFunction<_FreeStringFunc, FreeString>( - 'shorebird_free_string', - isLeaf: true); - checkForUpdate = library.lookupFunction<_GetBoolFunc, GetBool>( - 'shorebird_check_for_update', - isLeaf: true); - update = library.lookupFunction<_GetVoidFunc, GetVoid>('shorebird_update', - isLeaf: true); - } -} diff --git a/dart_bindings/lib/updater.dart b/dart_bindings/lib/updater.dart deleted file mode 100644 index bbcf9a7..0000000 --- a/dart_bindings/lib/updater.dart +++ /dev/null @@ -1,108 +0,0 @@ -import 'dart:ffi' as ffi; -import 'dart:io'; - -import 'package:ffi/ffi.dart'; -import 'package:path/path.dart' as path; - -import 'src/bindings.dart'; - -class Updater { - Updater(); - - static UpdaterBindings? _bindings; - - static ffi.DynamicLibrary _loadLibraryInDirectory( - {required String directory, required String name}) { - if (Platform.isMacOS) { - return ffi.DynamicLibrary.open(path.join(directory, 'lib$name.dylib')); - } - if (Platform.isWindows) { - return ffi.DynamicLibrary.open(path.join(directory, '$name.dll')); - } - // Assume everything else follows the Linux pattern. - return ffi.DynamicLibrary.open(path.join(directory, 'lib$name.so')); - } - - static loadLibrary({required String name, required String directory}) { - if (_bindings != null) { - throw Exception('Library already loaded.'); - } - final updater = _loadLibraryInDirectory(directory: directory, name: name); - _bindings = UpdaterBindings(updater); - } - - static loadFlutterLibrary() { - if (_bindings != null) { - throw Exception('Library already loaded.'); - } - final updater = ffi.DynamicLibrary.process(); - _bindings = UpdaterBindings(updater); - } - - static UpdaterBindings get bindings { - if (_bindings == null) { - throw Exception('Must call loadLibrary() first.'); - } - return _bindings!; - } - - // This is only used when called from a Dart command line. - // Shorebird will have initialized the library already for you when - // inside a Flutter app. - static void initUpdaterLibrary({ - required String appId, - required String version, - required String channel, - required String? updateUrl, - required List baseLibraryPaths, - required String vmPath, - required String cacheDir, - }) { - var config = AppParameters.allocate( - appId: appId, - version: version, - channel: channel, - updateUrl: updateUrl, - libappPaths: baseLibraryPaths, - libflutterPath: vmPath, - cacheDir: cacheDir, - ); - try { - bindings.init(config); - } finally { - AppParameters.free(config); - } - } - - bool checkForUpdate() { - return bindings.checkForUpdate(); - } - - void update() { - return bindings.update(); - } - - String? _returnsMaybeString(ffi.Pointer Function() f) { - ffi.Pointer cString = ffi.Pointer.fromAddress(0); - cString = f(); - if (cString.address == 0) { - return null; - } - try { - return cString.toDartString(); - } finally { - // Using finally for two reasons: - // 1. it runs after the return (saving us a local) - // 2. it runs even if toDartString throws (which it shouldn't) - bindings.freeString(cString); - } - } - - String? activeVersion() { - return _returnsMaybeString(bindings.activeVersion); - } - - String? activePath() { - return _returnsMaybeString(bindings.activePath); - } -} diff --git a/dart_bindings/pubspec.yaml b/dart_bindings/pubspec.yaml deleted file mode 100644 index 9d59b22..0000000 --- a/dart_bindings/pubspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: dart_bindings -description: dart bindings for Shorebird updater library -version: 1.0.0 - -environment: - sdk: '>=2.19.0 <4.0.0' - -# Add regular dependencies here. -dependencies: - ffi: ^2.0.1 - # path version must match that depended on by Flutter SDK. - path: ^1.8.2 - -dev_dependencies: - lints: ^2.0.0 - test: ^1.21.0 diff --git a/dart_cli/.gitignore b/dart_cli/.gitignore deleted file mode 100644 index 82cc80f..0000000 --- a/dart_cli/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# https://dart.dev/guides/libraries/private-files -# Created by `dart pub` -.dart_tool/ -pubspec.lock diff --git a/dart_cli/README.md b/dart_cli/README.md deleted file mode 100644 index 7fb9249..0000000 --- a/dart_cli/README.md +++ /dev/null @@ -1 +0,0 @@ -Command line application to test ffi wrapping of updater library. \ No newline at end of file diff --git a/dart_cli/analysis_options.yaml b/dart_cli/analysis_options.yaml deleted file mode 100644 index dee8927..0000000 --- a/dart_cli/analysis_options.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. - -include: package:lints/recommended.yaml - -# Uncomment the following section to specify additional rules. - -# linter: -# rules: -# - camel_case_types - -# analyzer: -# exclude: -# - path/to/excluded/files/** - -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options diff --git a/dart_cli/bin/dart_cli.dart b/dart_cli/bin/dart_cli.dart deleted file mode 100644 index 3257542..0000000 --- a/dart_cli/bin/dart_cli.dart +++ /dev/null @@ -1,137 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:args/command_runner.dart'; -import 'package:dart_bindings/updater.dart'; -import 'package:path/path.dart' as path; - -void main(List args) async { - var directory = path.join(Directory.current.path, 'target', 'debug'); - Updater.loadLibrary(directory: directory, name: "updater"); - - Updater.initUpdaterLibrary( - appId: 'demo', - version: '1.0.0', - channel: 'stable', - updateUrl: null, - baseLibraryPaths: ['libapp.so'], - vmPath: Platform.executable, - cacheDir: 'updater_cache', - ); - - var updater = Updater(); - final runner = CommandRunner('updater', 'Updater CLI') - ..addCommand(CheckForUpdate(updater)) - ..addCommand(PrintVersion(updater)) - ..addCommand(PrintPath(updater)) - ..addCommand(Update(updater)) - ..addCommand(Run(updater)); - await runner.run(args); -} - -class CheckForUpdate extends Command { - final Updater updater; - CheckForUpdate(this.updater); - - @override - final name = 'check'; - - @override - final description = 'Check for an update.'; - - @override - void run() { - var result = updater.checkForUpdate(); - if (result) { - print('Update available'); - } else { - print('No update available'); - } - } -} - -class PrintVersion extends Command { - final Updater updater; - PrintVersion(this.updater); - - @override - final name = 'version'; - - @override - final description = 'Print current installed version.'; - - @override - void run() { - print(updater.activeVersion()); - } -} - -class PrintPath extends Command { - final Updater updater; - PrintPath(this.updater); - - @override - final name = 'path'; - - @override - final description = 'Print current installed path.'; - - @override - void run() { - print(updater.activePath()); - } -} - -class Update extends Command { - final Updater updater; - Update(this.updater); - - @override - final name = 'update'; - - @override - final description = 'Update to the latest version.'; - - @override - void run() { - updater.update(); - } -} - -class Run extends Command { - final Updater updater; - Run(this.updater) { - argParser.addFlag('update', abbr: 'u', help: 'Update before running.'); - } - - @override - final name = 'run'; - - @override - final description = 'Run the active version.'; - - @override - void run() async { - // This is a basic demo of what this might look like. - // Real callers wouldn't likely do this from Dart as there is no need - // to have two copies of the Dart VM running. - - if (argResults!['update']) { - updater.update(); - } - - var path = updater.activePath(); - if (path == null) { - print('No active version (should run the bundled version)'); - return; - } - // Should this run update first? - print('Running $path'); - // Is there a portable way to just "exec" and replace the current process? - var process = await Process.start(Platform.executable, ['run', path]); - process.stdout.transform(utf8.decoder).forEach(stdout.write); - process.stderr.transform(utf8.decoder).forEach(stderr.write); - // TODO: Handle stdin. - exit(await process.exitCode); - } -} diff --git a/dart_cli/pubspec.yaml b/dart_cli/pubspec.yaml deleted file mode 100644 index 2b61d23..0000000 --- a/dart_cli/pubspec.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: dart_cli -description: A sample command-line application. -version: 1.0.0 -# repository: https://github.com/my_org/my_repo -publish_to: 'none' - -environment: - sdk: ">=2.19.0 <4.0.0" - -dependencies: - args: ^2.4.0 - dart_bindings: - path: ../dart_bindings - path: ^1.8.3 - -dev_dependencies: - lints: ^2.0.0 - test: ^1.21.0 diff --git a/example/counter/.gitignore b/example/counter/.gitignore deleted file mode 100644 index afc5846..0000000 --- a/example/counter/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release - -# Shorebird related -.shorebird/ diff --git a/example/counter/.metadata b/example/counter/.metadata deleted file mode 100644 index 66993e1..0000000 --- a/example/counter/.metadata +++ /dev/null @@ -1,45 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled. - -version: - revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - channel: master - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - base_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - - platform: android - create_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - base_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - - platform: ios - create_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - base_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - - platform: linux - create_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - base_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - - platform: macos - create_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - base_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - - platform: web - create_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - base_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - - platform: windows - create_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - base_revision: c4bc9d5f37b8a0e3fe5402f30659cb87c3dce3cb - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/example/counter/README.md b/example/counter/README.md deleted file mode 100644 index 9498e65..0000000 --- a/example/counter/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# counter - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) - -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev/), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/example/counter/analysis_options.yaml b/example/counter/analysis_options.yaml deleted file mode 100644 index 61b6c4d..0000000 --- a/example/counter/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/example/counter/android/.gitignore b/example/counter/android/.gitignore deleted file mode 100644 index 6f56801..0000000 --- a/example/counter/android/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties -**/*.keystore -**/*.jks diff --git a/example/counter/android/app/build.gradle b/example/counter/android/app/build.gradle deleted file mode 100644 index afc4500..0000000 --- a/example/counter/android/app/build.gradle +++ /dev/null @@ -1,71 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion flutter.compileSdkVersion - ndkVersion flutter.ndkVersion - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.counter" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/example/counter/android/app/src/main/AndroidManifest.xml b/example/counter/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index f80469f..0000000 --- a/example/counter/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/example/counter/android/app/src/main/kotlin/com/example/counter/MainActivity.kt b/example/counter/android/app/src/main/kotlin/com/example/counter/MainActivity.kt deleted file mode 100644 index 64a37ba..0000000 --- a/example/counter/android/app/src/main/kotlin/com/example/counter/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.counter - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/example/counter/android/app/src/main/res/drawable-v21/launch_background.xml b/example/counter/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f..0000000 --- a/example/counter/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/example/counter/android/app/src/main/res/drawable/launch_background.xml b/example/counter/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f..0000000 --- a/example/counter/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/example/counter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/counter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7b0906d62b1847e87f15cdcacf6a4f29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ diff --git a/example/counter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/counter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79bb8a35cc66c3c1fd44f5a5526c1b78be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ diff --git a/example/counter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/counter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34e7a88e3f88bea192c3a370d44689c3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof diff --git a/example/counter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/counter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eebdb28e45604e46eeda8dd24651419bc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` diff --git a/example/counter/android/app/src/main/res/values-night/styles.xml b/example/counter/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be..0000000 --- a/example/counter/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/example/counter/android/app/src/main/res/values/styles.xml b/example/counter/android/app/src/main/res/values/styles.xml deleted file mode 100644 index cb1ef88..0000000 --- a/example/counter/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/example/counter/android/app/src/profile/AndroidManifest.xml b/example/counter/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 6bdce5f..0000000 --- a/example/counter/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/example/counter/android/build.gradle b/example/counter/android/build.gradle deleted file mode 100644 index e50c3a0..0000000 --- a/example/counter/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.7.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.3.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/example/counter/android/gradle.properties b/example/counter/android/gradle.properties deleted file mode 100644 index 94adc3a..0000000 --- a/example/counter/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/example/counter/android/gradle/wrapper/gradle-wrapper.properties b/example/counter/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 3c472b9..0000000 --- a/example/counter/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/example/counter/android/settings.gradle b/example/counter/android/settings.gradle deleted file mode 100644 index 44e62bc..0000000 --- a/example/counter/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/example/counter/lib/main.dart b/example/counter/lib/main.dart deleted file mode 100644 index c255db0..0000000 --- a/example/counter/lib/main.dart +++ /dev/null @@ -1,162 +0,0 @@ -// ignore_for_file: avoid_print -import 'dart:math'; - -import 'package:dart_bindings/updater.dart'; -import 'package:flutter/material.dart'; - -void main() { - try { - Updater.loadFlutterLibrary(); - var updater = Updater(); - // Just to prove the bindings work at all: - print("active version: ${updater.activeVersion()}"); - print("active path: ${updater.activePath()}"); - } catch (e) { - print( - "Could not load shorebird updater library. Did you run with `shorebird run`?"); - print("Error: $e"); - } - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({super.key}); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Shorebird Demo', - theme: ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), - useMaterial3: true, - ), - home: const MyHomePage(title: 'Shorebird Updater Demo'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({super.key, required this.title}); - - final String title; - - @override - State createState() => _MyHomePageState(); -} - -// Stub until https://github.com/shorebirdtech/shorebird/issues/123 is resolved. -class Update { - const Update(this.version, this.bytes); - - final String version; - final int bytes; -} - -class _MyHomePageState extends State { - String _fileSizeString(int bytes) { - const suffixes = ["b", "kb", "mb", "gb"]; - final i = (log(bytes) / log(1024)).floor(); - return ((bytes / pow(1024, i)).toStringAsFixed(1)) + suffixes[i]; - } - - void _showUpdateBanner() { - const update = Update("1.2.3", 1234567); - - ScaffoldMessenger.of(context).showMaterialBanner(MaterialBanner( - padding: const EdgeInsets.all(20), - content: Text('A new version (${update.version}) is available.\n' - 'Download size: ${_fileSizeString(update.bytes)}'), - leading: const Icon(Icons.update), - backgroundColor: Colors.green, - // Android button order appears to be "negative", "neutral", "positive". - actions: [ - TextButton( - onPressed: () { - ScaffoldMessenger.of(context).hideCurrentMaterialBanner(); - }, - child: const Text('LATER'), - ), - TextButton( - onPressed: () { - ScaffoldMessenger.of(context).hideCurrentMaterialBanner(); - _showProgressBanner(); - }, - child: const Text('INSTALL'), - ), - ], - )); - } - - void _showProgressBanner() { - final controller = - ScaffoldMessenger.of(context).showMaterialBanner(MaterialBanner( - content: const LinearProgressIndicator( - value: null, - semanticsLabel: 'Download progress', - ), - leading: const Icon(Icons.update), - backgroundColor: Colors.green, - actions: [ - TextButton( - onPressed: () { - ScaffoldMessenger.of(context).hideCurrentMaterialBanner(); - }, - child: const Text('HIDE'), - ), - ], - )); - Future.delayed(const Duration(seconds: 5)).then((_) { - controller.close(); - _showRestartBanner(); - }); - } - - void _showRestartBanner() { - ScaffoldMessenger.of(context).showMaterialBanner(MaterialBanner( - content: const Text('Restart to apply update.'), - leading: const Icon(Icons.update), - backgroundColor: Colors.green, - // Android button order appears to be "negative", "neutral", "positive". - actions: [ - TextButton( - onPressed: () { - ScaffoldMessenger.of(context).hideCurrentMaterialBanner(); - }, - child: const Text('LATER'), - ), - TextButton( - onPressed: () { - ScaffoldMessenger.of(context).hideCurrentMaterialBanner(); - // Need a restart API. - // https://github.com/shorebirdtech/shorebird/issues/117 - }, - child: const Text('RESTART'), - ), - ], - )); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - backgroundColor: Theme.of(context).colorScheme.inversePrimary, - title: Text(widget.title), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: const [ - Text( - "This demo shows how to call the Shorebird updater library from Dart."), - ], - ), - ), - floatingActionButton: FloatingActionButton( - tooltip: 'Show Update Banner', - onPressed: _showUpdateBanner, - child: const Icon(Icons.update), - ), - ); - } -} diff --git a/example/counter/pubspec.lock b/example/counter/pubspec.lock deleted file mode 100644 index e17136d..0000000 --- a/example/counter/pubspec.lock +++ /dev/null @@ -1,203 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 - url: "https://pub.dev" - source: hosted - version: "2.10.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - characters: - dependency: transitive - description: - name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c - url: "https://pub.dev" - source: hosted - version: "1.2.1" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - collection: - dependency: transitive - description: - name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 - url: "https://pub.dev" - source: hosted - version: "1.17.0" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be - url: "https://pub.dev" - source: hosted - version: "1.0.5" - dart_bindings: - dependency: "direct main" - description: - path: "../../dart_bindings" - relative: true - source: path - version: "1.0.0" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 - url: "https://pub.dev" - source: hosted - version: "2.0.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c - url: "https://pub.dev" - source: hosted - version: "2.0.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - js: - dependency: transitive - description: - name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" - url: "https://pub.dev" - source: hosted - version: "0.6.5" - lints: - dependency: transitive - description: - name: lints - sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - matcher: - dependency: transitive - description: - name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" - url: "https://pub.dev" - source: hosted - version: "0.12.13" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 - url: "https://pub.dev" - source: hosted - version: "0.2.0" - meta: - dependency: transitive - description: - name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" - url: "https://pub.dev" - source: hosted - version: "1.8.0" - path: - dependency: transitive - description: - name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b - url: "https://pub.dev" - source: hosted - version: "1.8.2" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 - url: "https://pub.dev" - source: hosted - version: "1.9.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 - url: "https://pub.dev" - source: hosted - version: "1.11.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 - url: "https://pub.dev" - source: hosted - version: "0.4.16" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" -sdks: - dart: ">=2.19.0 <3.0.0" diff --git a/example/counter/pubspec.yaml b/example/counter/pubspec.yaml deleted file mode 100644 index fc0909e..0000000 --- a/example/counter/pubspec.yaml +++ /dev/null @@ -1,92 +0,0 @@ -name: counter -description: A new Flutter project. -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: "none" # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# In Windows, build-name is used as the major, minor, and patch parts -# of the product and file versions while build-number is used as the build suffix. -# HACK: Remove +1 which confuses `shorebird publish` for now. -version: 1.0.0 - -environment: - sdk: ">=2.19.0 <4.0.0" - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. -dependencies: - flutter: - sdk: flutter - dart_bindings: - path: ../../dart_bindings - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 - -dev_dependencies: - flutter_test: - sdk: flutter - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - flutter_lints: ^2.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - assets: - - shorebird.yaml - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/example/counter/shorebird.yaml b/example/counter/shorebird.yaml deleted file mode 100644 index b3f0c47..0000000 --- a/example/counter/shorebird.yaml +++ /dev/null @@ -1 +0,0 @@ -app_id: shorebird-counter \ No newline at end of file