From ecad111abada6fc35e9e4c8d5e7a36f306271d4a Mon Sep 17 00:00:00 2001 From: s1rius Date: Sat, 6 Jul 2024 12:41:48 +0800 Subject: [PATCH] flutter: publish 0.2.0 --- .github/workflows/publish_flutter.yml | 10 ++++++++++ ezlog_flutter/example/ios/Podfile.lock | 14 +++++++------- ezlog_flutter/example/pubspec.lock | 2 +- ezlog_flutter/ios/ezlog_flutter.podspec | 8 ++++---- .../lib/ezlog_flutter_method_channel.dart | 3 +-- ezlog_flutter/pubspec.yaml | 4 ++-- .../test/ezlog_flutter_method_channel_test.dart | 13 ++++++++++--- ezlog_flutter/test/ezlog_flutter_test.dart | 2 +- 8 files changed, 36 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/publish_flutter.yml diff --git a/.github/workflows/publish_flutter.yml b/.github/workflows/publish_flutter.yml new file mode 100644 index 0000000..ec4d855 --- /dev/null +++ b/.github/workflows/publish_flutter.yml @@ -0,0 +1,10 @@ +# .github/workflows/publish.yml +name: Publish to pub.dev + +on: [push, workflow_dispatch] + +jobs: + publish: + uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main + with: + working-directory: ./ezlog_flutter \ No newline at end of file diff --git a/ezlog_flutter/example/ios/Podfile.lock b/ezlog_flutter/example/ios/Podfile.lock index ec1c8ab..a66537c 100644 --- a/ezlog_flutter/example/ios/Podfile.lock +++ b/ezlog_flutter/example/ios/Podfile.lock @@ -1,7 +1,7 @@ PODS: - - EZLog (0.2.0-alpha.2) - - ezlog_flutter (0.0.1): - - EZLog (> 0.2.0-alpha) + - EZLog (0.2.0) + - ezlog_flutter (0.2.0): + - EZLog (>= 0.2.0) - Flutter - Flutter (1.0.0) - path_provider_foundation (0.0.1): @@ -26,11 +26,11 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/path_provider_foundation/darwin" SPEC CHECKSUMS: - EZLog: 73e75c62b598027af95bdac502c51311ba0174b4 - ezlog_flutter: 3ecbd6658ff9145d725abe33da65e6e4717eda51 + EZLog: 842e5b9304e72faef324e33412467fa3c001074a + ezlog_flutter: a2e88fe49b52e794d9c884612163cfa4998913ed Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 -PODFILE CHECKSUM: 8b0dd513666eaf3741dd960dfac96db902517c4f +PODFILE CHECKSUM: b13414d87395f00cffa4410db337c2a57c089154 -COCOAPODS: 1.12.1 +COCOAPODS: 1.15.2 diff --git a/ezlog_flutter/example/pubspec.lock b/ezlog_flutter/example/pubspec.lock index a39287d..07b565b 100644 --- a/ezlog_flutter/example/pubspec.lock +++ b/ezlog_flutter/example/pubspec.lock @@ -55,7 +55,7 @@ packages: path: ".." relative: true source: path - version: "0.1.7" + version: "0.2.0" fake_async: dependency: transitive description: diff --git a/ezlog_flutter/ios/ezlog_flutter.podspec b/ezlog_flutter/ios/ezlog_flutter.podspec index 06a4ed5..e3e2237 100644 --- a/ezlog_flutter/ios/ezlog_flutter.podspec +++ b/ezlog_flutter/ios/ezlog_flutter.podspec @@ -4,18 +4,18 @@ # Pod::Spec.new do |s| s.name = 'ezlog_flutter' - s.version = '0.0.1' + s.version = '0.2.0' s.summary = 'EZLog Flutter plugin project. A cross-platform file logging library.' s.description = <<-DESC EZLog Flutter plugin project. A cross-platform file logging library. DESC - s.homepage = 'http://example.com' + s.homepage = 'http://s1rius.github.io/ezlog' s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } + s.author = { 's1rius' => "" } s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'Flutter' - s.dependency 'EZLog', '> 0.2.0-alpha' + s.dependency 'EZLog', '>= 0.2.0' s.platform = :ios, '13.0' # Flutter.framework does not contain a i386 slice. diff --git a/ezlog_flutter/lib/ezlog_flutter_method_channel.dart b/ezlog_flutter/lib/ezlog_flutter_method_channel.dart index e760fc7..52ccbc7 100644 --- a/ezlog_flutter/lib/ezlog_flutter_method_channel.dart +++ b/ezlog_flutter/lib/ezlog_flutter_method_channel.dart @@ -1,5 +1,3 @@ -import 'dart:typed_data'; - import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; @@ -73,6 +71,7 @@ class MethodChannelEzlogFlutter extends EZLogFlutterPlatform { }); } + @override void trim() { methodChannel.invokeMapMethod("trim"); } diff --git a/ezlog_flutter/pubspec.yaml b/ezlog_flutter/pubspec.yaml index efd171e..5440d87 100644 --- a/ezlog_flutter/pubspec.yaml +++ b/ezlog_flutter/pubspec.yaml @@ -1,10 +1,10 @@ name: ezlog_flutter description: EZLog Flutter plugin project. A cross-platform file logging library. -version: 0.1.7 +version: 0.2.0 homepage: https://github.com/s1rius/ezlog/ezlog_flutter environment: - sdk: ">=2.17.1 <3.0.0" + sdk: ">=2.17.1 <4.0.0" flutter: ">=2.5.0" dependencies: diff --git a/ezlog_flutter/test/ezlog_flutter_method_channel_test.dart b/ezlog_flutter/test/ezlog_flutter_method_channel_test.dart index 8011a5e..3d18a6d 100644 --- a/ezlog_flutter/test/ezlog_flutter_method_channel_test.dart +++ b/ezlog_flutter/test/ezlog_flutter_method_channel_test.dart @@ -6,13 +6,20 @@ void main() { TestWidgetsFlutterBinding.ensureInitialized(); + Future onMethodCall(MethodCall call) { + switch (call.method) { + default: + throw UnimplementedError( + "${call.method} was invoked but isn't implemented by PlatformViewsService"); + } + } + setUp(() { - channel.setMockMethodCallHandler((MethodCall methodCall) async { - return '42'; - }); + channel.setMethodCallHandler(onMethodCall); }); tearDown(() { + // ignore: deprecated_member_use channel.setMockMethodCallHandler(null); }); } diff --git a/ezlog_flutter/test/ezlog_flutter_test.dart b/ezlog_flutter/test/ezlog_flutter_test.dart index 876741b..b842527 100644 --- a/ezlog_flutter/test/ezlog_flutter_test.dart +++ b/ezlog_flutter/test/ezlog_flutter_test.dart @@ -40,7 +40,7 @@ class MockEZLogFlutterPlatform } @override - Future?> requestLogFilesForDate(String name, String date) { + Future?> requestLogFilesForDate(String name, DateTime date) { throw UnimplementedError(); }