diff --git a/.gitignore b/.gitignore index 334af6d..65de10d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ **/*.g.dart **/*.gr.dart **/*.freezed.dart +**/*.cherrypick_injectable.g.dart pubspec_overrides.yaml diff --git a/cherrypick/pubspec.yaml b/cherrypick/pubspec.yaml index e740425..e78d641 100644 --- a/cherrypick/pubspec.yaml +++ b/cherrypick/pubspec.yaml @@ -7,7 +7,7 @@ repository: https://github.com/pese-git/cherrypick issue_tracker: https://github.com/pese-git/cherrypick/issues environment: - sdk: ">=3.0.0 <4.0.0" + sdk: ">=3.5.2 <4.0.0" dependencies: meta: ^1.3.0 diff --git a/cherrypick_annotations/.gitignore b/cherrypick_annotations/.gitignore index 16cc011..b687c1a 100644 --- a/cherrypick_annotations/.gitignore +++ b/cherrypick_annotations/.gitignore @@ -21,4 +21,6 @@ doc/api/ *.js.map # FVM Version Cache -.fvm/ \ No newline at end of file +.fvm/ + +melos_cherrypick_annotations.iml \ No newline at end of file diff --git a/cherrypick_annotations/example/cherrypick_annotations_example.dart b/cherrypick_annotations/example/cherrypick_annotations_example.dart deleted file mode 100644 index 4dc5bf6..0000000 --- a/cherrypick_annotations/example/cherrypick_annotations_example.dart +++ /dev/null @@ -1,3 +0,0 @@ -void main() { - print('awesome'); -} diff --git a/cherrypick_annotations/lib/cherrypick_annotations.dart b/cherrypick_annotations/lib/cherrypick_annotations.dart index 2348ba3..8f0e469 100644 --- a/cherrypick_annotations/lib/cherrypick_annotations.dart +++ b/cherrypick_annotations/lib/cherrypick_annotations.dart @@ -3,6 +3,6 @@ /// More dartdocs go here. library; -export 'src/cherrypick_annotations_base.dart'; +export 'injectable.dart'; // TODO: Export any libraries intended for clients of this package. diff --git a/cherrypick_annotations/lib/injectable.dart b/cherrypick_annotations/lib/injectable.dart new file mode 100644 index 0000000..0cc94ef --- /dev/null +++ b/cherrypick_annotations/lib/injectable.dart @@ -0,0 +1,6 @@ +library; + +/// Отмечает класс как injectable для автоматической регистрации. +class Injectable { + const Injectable(); +} diff --git a/cherrypick_annotations/lib/src/cherrypick_annotations_base.dart b/cherrypick_annotations/lib/src/cherrypick_annotations_base.dart deleted file mode 100644 index cdd51bb..0000000 --- a/cherrypick_annotations/lib/src/cherrypick_annotations_base.dart +++ /dev/null @@ -1,5 +0,0 @@ -// Define the Inject annotation -class Inject { - final String? named; - const Inject({this.named}); -} diff --git a/cherrypick_annotations/pubspec.yaml b/cherrypick_annotations/pubspec.yaml index 7171c6a..cad08b1 100644 --- a/cherrypick_annotations/pubspec.yaml +++ b/cherrypick_annotations/pubspec.yaml @@ -4,12 +4,13 @@ version: 1.0.0 # repository: https://github.com/my_org/my_repo environment: - sdk: ^3.5.2 + sdk: ">=3.5.2 <4.0.0" # Add regular dependencies here. dependencies: + meta: ^1.15.0 # path: ^1.8.0 dev_dependencies: - lints: ^4.0.0 - test: ^1.24.0 + lints: ^5.0.0 + test: ^1.25.8 diff --git a/cherrypick_flutter/pubspec.yaml b/cherrypick_flutter/pubspec.yaml index 0b47fba..c2fedc9 100644 --- a/cherrypick_flutter/pubspec.yaml +++ b/cherrypick_flutter/pubspec.yaml @@ -7,8 +7,8 @@ repository: https://github.com/pese-git/cherrypick issue_tracker: https://github.com/pese-git/cherrypick/issues environment: - sdk: ^3.5.2 - flutter: ">=1.17.0" + sdk: ">=3.5.2 <4.0.0" + flutter: ">=3.24.0" dependencies: flutter: diff --git a/cherrypick_generator/.gitignore b/cherrypick_generator/.gitignore index 16cc011..6897175 100644 --- a/cherrypick_generator/.gitignore +++ b/cherrypick_generator/.gitignore @@ -21,4 +21,8 @@ doc/api/ *.js.map # FVM Version Cache -.fvm/ \ No newline at end of file +.fvm/ + +melos_cherrypick_generator.iml + +**/*.mocks.dart \ No newline at end of file diff --git a/cherrypick_generator/build.yaml b/cherrypick_generator/build.yaml index 1af0f7d..9b10d4b 100644 --- a/cherrypick_generator/build.yaml +++ b/cherrypick_generator/build.yaml @@ -1,5 +1,16 @@ +builders: + injectable: + import: "package:cherrypick_generator/injectable_generator.dart" + builder_factories: ["injectableBuilder"] + build_extensions: {".dart": [".cherrypick_injectable.g.dart"]} + auto_apply: dependents + required_inputs: ["lib/**"] + runs_before: [] + build_to: source + targets: $default: builders: - cherrypick_generator|inject_builder: - enabled: true \ No newline at end of file + cherrypick_generator|injectable: + generate_for: + - lib/**.dart \ No newline at end of file diff --git a/cherrypick_generator/example/cherrypick_generator_example.dart b/cherrypick_generator/example/cherrypick_generator_example.dart deleted file mode 100644 index 3b24ef3..0000000 --- a/cherrypick_generator/example/cherrypick_generator_example.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:cherrypick_generator/cherrypick_generator.dart'; - -void main() { - var awesome = Awesome(); - print('awesome: ${awesome.isAwesome}'); -} diff --git a/cherrypick_generator/lib/cherrypick_generator.dart b/cherrypick_generator/lib/cherrypick_generator.dart index bbfa5c5..5f7c9d2 100644 --- a/cherrypick_generator/lib/cherrypick_generator.dart +++ b/cherrypick_generator/lib/cherrypick_generator.dart @@ -1,8 +1,3 @@ -/// Support for doing something awesome. -/// -/// More dartdocs go here. library; -export 'src/cherrypick_generator_base.dart'; - -// TODO: Export any libraries intended for clients of this package. +export 'inject_generator.dart'; diff --git a/cherrypick_generator/lib/inject_generator.dart b/cherrypick_generator/lib/inject_generator.dart new file mode 100644 index 0000000..f8675bb --- /dev/null +++ b/cherrypick_generator/lib/inject_generator.dart @@ -0,0 +1,38 @@ +import 'dart:async'; +import 'package:build/build.dart'; +import 'package:source_gen/source_gen.dart'; +import 'package:analyzer/dart/element/element.dart'; +import 'package:cherrypick_annotations/cherrypick_annotations.dart'; + +class InjectGenerator extends GeneratorForAnnotation { + @override + FutureOr generateForAnnotatedElement( + Element element, + ConstantReader annotation, + BuildStep buildStep, + ) { + print('[TRACE] Processing element: ${element.name}'); + + if (element is! FieldElement) { + throw InvalidGenerationSourceError( + 'Inject can only be used on fields.', + element: element, + ); + } + + print('[TRACE] Starting code generation for element: ${element.name}'); + + final className = element.enclosingElement.name; + final fieldName = element.name; + final fieldType = element.type.getDisplayString(withNullability: false); + final annotationName = annotation.read('named').stringValue; + + return ''' +extension \$${className}Inject on $className { + void init$fieldName() { + print("Injected $fieldType named '$annotationName' into $fieldName"); + } +} +'''; + } +} diff --git a/cherrypick_generator/lib/injectable_generator.dart b/cherrypick_generator/lib/injectable_generator.dart new file mode 100644 index 0000000..5015175 --- /dev/null +++ b/cherrypick_generator/lib/injectable_generator.dart @@ -0,0 +1,33 @@ +import 'package:source_gen/source_gen.dart'; +import 'package:analyzer/dart/element/element.dart'; +import 'package:build/build.dart'; +import 'package:cherrypick_annotations/cherrypick_annotations.dart'; + +class InjectableGenerator extends GeneratorForAnnotation { + @override + generateForAnnotatedElement( + Element element, ConstantReader annotation, BuildStep buildStep) { + if (element is! ClassElement) return null; + + final className = element.name; + + // Используйте уникальное имя функции (например, привязанное к файлу/классу) + return ''' +void \$initCherrypickGenerated() { + print("Generate code success $className"); +} +'''; + } +} + +Builder injectableBuilder(BuilderOptions options) => + PartBuilder([InjectableGenerator()], '.cherrypick_injectable.g.dart'); + +/* +Builder injectableBuilder(BuilderOptions options) => SharedPartBuilder( + [InjectableGenerator()], + 'injectable', + allowSyntaxErrors: true, + writeDescriptions: true, + ); +*/ diff --git a/cherrypick_generator/lib/src/cherrypick_generator_base.dart b/cherrypick_generator/lib/src/cherrypick_generator_base.dart deleted file mode 100644 index e8a6f15..0000000 --- a/cherrypick_generator/lib/src/cherrypick_generator_base.dart +++ /dev/null @@ -1,6 +0,0 @@ -// TODO: Put public facing types in this file. - -/// Checks if you are awesome. Spoiler: you are. -class Awesome { - bool get isAwesome => true; -} diff --git a/cherrypick_generator/lib/src/inject_generator.dart b/cherrypick_generator/lib/src/inject_generator.dart deleted file mode 100644 index 8048dea..0000000 --- a/cherrypick_generator/lib/src/inject_generator.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'dart:async'; -import 'package:build/build.dart'; -import 'package:source_gen/source_gen.dart'; -import 'package:cherrypick_annotations/cherrypick_annotations.dart'; -import 'package:analyzer/dart/element/element.dart'; - -class InjectGenerator extends GeneratorForAnnotation { - @override - FutureOr generateForAnnotatedElement( - Element element, ConstantReader annotation, BuildStep buildStep) { - if (element is! FieldElement) { - throw InvalidGenerationSourceError( - 'Генератор не может работать с `${element.name}`.', - ); - } - - final named = annotation.peek('named')?.stringValue; - final resolveSnippet = named == null - ? 'CherryPickProvider.of(context).openRootScope().resolve<${element.type}>()' - : 'CherryPickProvider.of(context).openRootScope().resolve<${element.type}>(named: \'$named\')'; - - return ''' -void _initState(BuildContext context) { - ${element.name} = $resolveSnippet; -} -'''; - } -} diff --git a/cherrypick_generator/pubspec.yaml b/cherrypick_generator/pubspec.yaml index 6b75ce8..8892aae 100644 --- a/cherrypick_generator/pubspec.yaml +++ b/cherrypick_generator/pubspec.yaml @@ -2,17 +2,22 @@ name: cherrypick_generator description: Code generator for cherrypick annotations version: 1.0.0 # repository: https://github.com/my_org/my_repo +publish_to: none environment: - sdk: ^3.5.2 + sdk: ">=3.5.2 <4.0.0" # Add regular dependencies here. dependencies: - build: ^2.0.0 - source_gen: ^1.0.0 - cherrypick_annotations: any + cherrypick_annotations: + path: ../cherrypick_annotations + analyzer: any + dart_style: any + build: any + build_runner: any + source_gen: any dev_dependencies: - lints: ^4.0.0 - test: ^1.24.0 - build_runner: ^2.1.0 \ No newline at end of file + lints: ^5.0.0 + mockito: any + test: ^1.25.8 diff --git a/cherrypick_generator/test/cherrypick_generator_test.dart b/cherrypick_generator/test/cherrypick_generator_test.dart index dd784bb..404cb67 100644 --- a/cherrypick_generator/test/cherrypick_generator_test.dart +++ b/cherrypick_generator/test/cherrypick_generator_test.dart @@ -1,16 +1,13 @@ -import 'package:cherrypick_generator/cherrypick_generator.dart'; import 'package:test/test.dart'; void main() { group('A group of tests', () { - final awesome = Awesome(); - setUp(() { // Additional setup goes here. }); test('First Test', () { - expect(awesome.isAwesome, isTrue); + expect(2, 2); }); }); } diff --git a/examples/client_app/.gitignore b/examples/client_app/.gitignore index 80ad3a6..1f67328 100644 --- a/examples/client_app/.gitignore +++ b/examples/client_app/.gitignore @@ -49,4 +49,5 @@ pubspec_overrides.yaml **/*.g.dart **/*.gr.dart **/*.freezed.dart +**/*.cherrypick_injectable.g.dart diff --git a/examples/client_app/lib/foo.dart b/examples/client_app/lib/foo.dart new file mode 100644 index 0000000..6e0c2d6 --- /dev/null +++ b/examples/client_app/lib/foo.dart @@ -0,0 +1,14 @@ +import 'package:cherrypick_annotations/cherrypick_annotations.dart'; + +part 'foo.cherrypick_injectable.g.dart'; + +@Injectable() +class Foo { + late final String field; +} + +// где-то в main: +void iniFoo() { + $initCherrypickGenerated(); + // ... остальной код +} diff --git a/examples/client_app/lib/main.dart b/examples/client_app/lib/main.dart index e7d6783..fe4dbe0 100644 --- a/examples/client_app/lib/main.dart +++ b/examples/client_app/lib/main.dart @@ -1,14 +1,12 @@ import 'package:cherrypick/cherrypick.dart'; +import 'package:client_app/my_home_page.dart'; import 'package:flutter/material.dart'; import 'package:cherrypick_flutter/cherrypick_flutter.dart'; -import 'my_home_page.dart'; -import 'use_case.dart'; void main() { // Здесь происходит инициализация рутового скоупа и привязка зависимостей CherryPick.openRootScope().installModules([ // Создаем модуль, который будет предоставлять UseCase - ModuleWithUseCase(), ]); runApp( @@ -23,19 +21,10 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return MaterialApp( - title: 'Example App', - theme: ThemeData(primarySwatch: Colors.blue), - home: const MyHomePage(), + return CherryPickProvider( + child: MaterialApp( + home: MyHomePage(), + ), ); } } - -// Модуль для настройки зависимостей -class ModuleWithUseCase extends Module { - @override - void builder(Scope currentScope) { - // Привязка UseCase как singleton - bind().toInstance(UseCase()); - } -} diff --git a/examples/client_app/lib/my_home_page.dart b/examples/client_app/lib/my_home_page.dart index 91aaea4..4b754ac 100644 --- a/examples/client_app/lib/my_home_page.dart +++ b/examples/client_app/lib/my_home_page.dart @@ -1,16 +1,19 @@ +import 'package:cherrypick_annotations/cherrypick_annotations.dart'; import 'package:flutter/material.dart'; -import 'package:cherrypick_flutter/cherrypick_flutter.dart'; import 'use_case.dart'; +part 'my_home_page.cherrypick_injectable.g.dart'; + +@Injectable() class MyHomePage extends StatelessWidget { - const MyHomePage({super.key}); + late final UseCase useCase; + + // ignore: prefer_const_constructors_in_immutables + MyHomePage({super.key}); @override Widget build(BuildContext context) { - // Разрешение зависимости UseCase из рутового скоупа - final UseCase useCase = - CherryPickProvider.of(context).openRootScope().resolve(); - + //_inject(context); // Make sure this function is called in context return Scaffold( appBar: AppBar( title: const Text('Example App'), diff --git a/examples/client_app/lib/my_service.dart b/examples/client_app/lib/my_service.dart new file mode 100644 index 0000000..1225d15 --- /dev/null +++ b/examples/client_app/lib/my_service.dart @@ -0,0 +1,12 @@ +import 'package:cherrypick_annotations/cherrypick_annotations.dart'; + +part 'my_service.cherrypick_injectable.g.dart'; + +@Injectable() +class MyService {} + +// где-то в main: +void init() { + $initCherrypickGenerated(); + // ... остальной код +} diff --git a/examples/client_app/pubspec.lock b/examples/client_app/pubspec.lock index 1b8f1a3..f255abf 100644 --- a/examples/client_app/pubspec.lock +++ b/examples/client_app/pubspec.lock @@ -1,6 +1,35 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 + url: "https://pub.dev" + source: hosted + version: "72.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 + url: "https://pub.dev" + source: hosted + version: "6.7.0" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" async: dependency: transitive description: @@ -17,6 +46,70 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" + url: "https://pub.dev" + source: hosted + version: "2.4.13" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 + url: "https://pub.dev" + source: hosted + version: "7.3.2" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4 + url: "https://pub.dev" + source: hosted + version: "8.9.5" characters: dependency: transitive description: @@ -25,6 +118,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" cherrypick: dependency: "direct main" description: @@ -47,6 +148,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" + url: "https://pub.dev" + source: hosted + version: "4.10.1" collection: dependency: transitive description: @@ -55,6 +164,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" cupertino_icons: dependency: "direct main" description: @@ -63,6 +188,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" + url: "https://pub.dev" + source: hosted + version: "2.3.7" fake_async: dependency: transitive description: @@ -71,6 +204,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -89,6 +238,70 @@ packages: description: flutter source: sdk version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.dev" + source: hosted + version: "3.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" leak_tracker: dependency: transitive description: @@ -121,6 +334,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" matcher: dependency: transitive description: @@ -145,6 +374,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.15.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" + source: hosted + version: "2.2.0" path: dependency: transitive description: @@ -153,11 +398,59 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.0" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: "81876843eb50dc2e1e5b151792c9a985c5ed2536914115ed04e9c8528f6647b0" + url: "https://pub.dev" + source: hosted + version: "1.4.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 + url: "https://pub.dev" + source: hosted + version: "2.0.1" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" source_span: dependency: transitive description: @@ -182,6 +475,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 + url: "https://pub.dev" + source: hosted + version: "2.1.1" string_scanner: dependency: transitive description: @@ -206,6 +507,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.2" + timing: + dependency: transitive + description: + name: timing + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" vector_math: dependency: transitive description: @@ -222,6 +539,46 @@ packages: url: "https://pub.dev" source: hosted version: "14.2.5" + watcher: + dependency: transitive + description: + name: watcher + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 + url: "https://pub.dev" + source: hosted + version: "3.0.3" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" sdks: dart: ">=3.5.2 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/examples/client_app/pubspec.yaml b/examples/client_app/pubspec.yaml index b4f1a80..5ee60bb 100644 --- a/examples/client_app/pubspec.yaml +++ b/examples/client_app/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: 'none' version: 1.0.0+1 environment: - sdk: ^3.5.2 + sdk: ">=3.5.2 <4.0.0" dependencies: @@ -14,6 +14,8 @@ dependencies: cherrypick: ^2.1.0 cherrypick_flutter: ^1.1.1 + cherrypick_annotations: any + cupertino_icons: ^1.0.8 dev_dependencies: @@ -22,6 +24,9 @@ dev_dependencies: flutter_lints: ^4.0.0 + cherrypick_generator: any + build_runner: any + # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/melos.yaml b/melos.yaml index bd3a823..86233fa 100644 --- a/melos.yaml +++ b/melos.yaml @@ -5,6 +5,8 @@ sdkPath: .fvm/flutter_sdk packages: - cherrypick - cherrypick_flutter + - cherrypick_annotations + - cherrypick_generator - examples/client_app - examples/postly @@ -13,7 +15,7 @@ scripts: exec: dart analyze format: - exec: dart format + exec: dart format lib test: exec: flutter test @@ -22,3 +24,8 @@ scripts: run: | melos exec --scope="postly" -- dart run build_runner build --delete-conflicting-outputs + upgrade: + exec: darp pub upgrade + + drop: + exec: flutter clean diff --git a/pubspec.lock b/pubspec.lock index 2ed5c76..eb70210 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -623,4 +623,4 @@ packages: source: hosted version: "2.2.2" sdks: - dart: ">=3.5.0 <4.0.0" + dart: ">=3.5.2 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 656b237..90d18e5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ repository: https://github.com/pese-git/cherrypick issue_tracker: https://github.com/pese-git/cherrypick/issues environment: - sdk: ">=3.0.0 <4.0.0" + sdk: ">=3.5.2 <4.0.0" dependencies: meta: ^1.3.0