From 4a118bf07e50b85d535a55c2a9faa6b7f0105eff Mon Sep 17 00:00:00 2001 From: Daniel Hoer Date: Mon, 1 Jun 2026 20:32:08 +0200 Subject: [PATCH 1/3] feat: add SwiftPM support --- .github/workflows/build.yml | 8 +- .github/workflows/lint.yml | 4 +- .github/workflows/test.yml | 2 +- .gitignore | 2 + docs/en/quick-start.md | 15 +- docs/zh/quick-start.md | 15 +- melos.yaml | 4 +- packages/auto_updater/CHANGELOG.md | 6 + packages/auto_updater/bin/generate_keys.dart | 25 +-- packages/auto_updater/bin/sign_update.dart | 55 +++---- packages/auto_updater/example/lib/main.dart | 2 +- .../auto_updater/example/lib/pages/home.dart | 4 +- packages/auto_updater/example/macos/Podfile | 2 +- .../auto_updater/example/macos/Podfile.lock | 14 +- .../macos/Runner.xcodeproj/project.pbxproj | 28 +++- .../xcshareddata/swiftpm/Package.resolved | 14 ++ .../xcshareddata/xcschemes/Runner.xcscheme | 19 +++ .../example/macos/Runner/AppDelegate.swift | 4 + packages/auto_updater/example/pubspec.yaml | 2 +- .../flutter/generated_plugin_registrant.cc | 6 +- .../windows/flutter/generated_plugins.cmake | 2 +- packages/auto_updater/lib/src/appcast.dart | 4 +- packages/auto_updater/lib/src/appcast.g.dart | 50 +++--- .../auto_updater/lib/src/auto_updater.dart | 8 +- .../auto_updater/lib/src/sparkle_tools.dart | 110 +++++++++++++ packages/auto_updater/pubspec.yaml | 4 +- .../auto_updater/test/sparkle_tools_test.dart | 147 ++++++++++++++++++ packages/auto_updater_macos/CHANGELOG.md | 6 + .../macos/auto_updater_macos.podspec | 6 +- .../macos/auto_updater_macos/Package.swift | 27 ++++ .../auto_updater_macos}/AutoUpdater.swift | 0 .../AutoUpdaterMacosPlugin.swift | 0 packages/auto_updater_macos/pubspec.yaml | 5 +- .../CHANGELOG.md | 4 + .../lib/src/auto_updater_method_channel.dart | 8 +- .../pubspec.yaml | 4 +- packages/auto_updater_windows/CHANGELOG.md | 4 + packages/auto_updater_windows/pubspec.yaml | 4 +- pubspec.yaml | 2 +- 39 files changed, 484 insertions(+), 142 deletions(-) create mode 100644 packages/auto_updater/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 packages/auto_updater/lib/src/sparkle_tools.dart create mode 100644 packages/auto_updater/test/sparkle_tools_test.dart create mode 100644 packages/auto_updater_macos/macos/auto_updater_macos/Package.swift rename packages/auto_updater_macos/macos/{Classes => auto_updater_macos/Sources/auto_updater_macos}/AutoUpdater.swift (100%) rename packages/auto_updater_macos/macos/{Classes => auto_updater_macos/Sources/auto_updater_macos}/AutoUpdaterMacosPlugin.swift (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 37df15b..071f4bf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: # - uses: actions/checkout@v3 # - uses: subosito/flutter-action@v2 # with: - # flutter-version: "3.24.3" + # flutter-version: "3.44.0" # channel: "stable" # - run: | # sudo apt-get update @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: "3.24.3" + flutter-version: "3.44.0" channel: "stable" - uses: bluefireteam/melos-action@v3 - working-directory: ./packages/auto_updater/example @@ -43,7 +43,7 @@ jobs: # - uses: actions/checkout@v3 # - uses: subosito/flutter-action@v2 # with: - # flutter-version: "3.24.3" + # flutter-version: "3.44.0" # channel: "stable" # - uses: bluefireteam/melos-action@v3 # - working-directory: ./packages/auto_updater/example @@ -56,7 +56,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: "3.24.3" + flutter-version: "3.44.0" channel: "stable" - uses: bluefireteam/melos-action@v3 - working-directory: ./packages/auto_updater/example diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 560be9c..78ce584 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: "3.24.3" + flutter-version: "3.44.0" channel: "stable" - uses: bluefireteam/melos-action@v3 - run: melos run analyze @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: "3.24.3" + flutter-version: "3.44.0" channel: "stable" cache: true - uses: bluefireteam/melos-action@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 394765d..76b9837 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: "3.24.3" + flutter-version: "3.44.0" channel: "stable" cache: true - uses: bluefireteam/melos-action@v3 diff --git a/.gitignore b/.gitignore index fa08f05..20f7101 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .dart_tool/ +.build/ +.swiftpm/ .idea/ *.iml diff --git a/docs/en/quick-start.md b/docs/en/quick-start.md index e7e3417..0efa75e 100644 --- a/docs/en/quick-start.md +++ b/docs/en/quick-start.md @@ -34,6 +34,14 @@ Run the following command: choco install openssl ``` +### ⚠️ macOS requirements + +- Flutter `>=3.41.0` +- macOS deployment target `>=10.15` + +The macOS implementation supports both Flutter's Swift Package Manager integration +and CocoaPods. It depends on Sparkle `>=2.9.2 <3.0`. + ## Usage ```dart @@ -65,6 +73,9 @@ dart run auto_updater:generate_keys ``` > You need to run this command on `macOS` and `Windows` systems separately. +> On macOS, this command uses the Sparkle tools from +> `AUTO_UPDATER_SPARKLE_BIN`, `macos/Pods/Sparkle/bin`, or +> `build/macos/SourcePackages/artifacts/sparkle/Sparkle/bin`. #### macOS @@ -263,7 +274,9 @@ serve -l 5002 ### macOS -- Make sure you have the sparkle pod added as described in [Sparkle Documentation](https://sparkle-project.org/documentation/) +- If you use CocoaPods, make sure you have the Sparkle pod added as described in [Sparkle Documentation](https://sparkle-project.org/documentation/) +- If you use Swift Package Manager, run `flutter build macos` first so Xcode fetches Sparkle into `build/macos/SourcePackages/artifacts/sparkle/Sparkle/bin`. +- If Sparkle tools are installed somewhere else, set `AUTO_UPDATER_SPARKLE_BIN` to the directory containing `generate_keys` and `sign_update`. - Make sure you have added and enabled network capabilties of your app and disabled the sandbox for release by adding the following to your entitlement files for debug and release ``` diff --git a/docs/zh/quick-start.md b/docs/zh/quick-start.md index 60665e7..eeb81af 100644 --- a/docs/zh/quick-start.md +++ b/docs/zh/quick-start.md @@ -34,6 +34,14 @@ dependencies: choco install openssl ``` +### ⚠️ macOS 要求 + +- Flutter `>=3.41.0` +- macOS 部署目标 `>=10.15` + +macOS 实现同时支持 Flutter 的 Swift Package Manager 集成和 CocoaPods。它依赖 +Sparkle `>=2.9.2 <3.0`。 + ## 用法 ```dart @@ -65,6 +73,9 @@ dart run auto_updater:generate_keys ``` > 需要分别在 `macOS` 和 `Windows` 系统中运行该命令。 +> 在 macOS 上,该命令会从 `AUTO_UPDATER_SPARKLE_BIN`、 +> `macos/Pods/Sparkle/bin` 或 +> `build/macos/SourcePackages/artifacts/sparkle/Sparkle/bin` 查找 Sparkle 工具。 #### macOS @@ -263,7 +274,9 @@ serve -l 5002 ### macOS -- 确保按照 [Sparkle 文档](https://sparkle-project.org/documentation/)中的说明添加了 sparkle pod +- 如果使用 CocoaPods,请确保按照 [Sparkle 文档](https://sparkle-project.org/documentation/)中的说明添加了 Sparkle pod +- 如果使用 Swift Package Manager,请先运行 `flutter build macos`,让 Xcode 将 Sparkle 拉取到 `build/macos/SourcePackages/artifacts/sparkle/Sparkle/bin` +- 如果 Sparkle 工具安装在其他位置,请将 `AUTO_UPDATER_SPARKLE_BIN` 设置为包含 `generate_keys` 和 `sign_update` 的目录 - 通过将以下内容添加到您的授权文件以进行调试和发布,确保您已添加并启用应用程序的网络功能并禁用沙箱以进行发布 ``` diff --git a/melos.yaml b/melos.yaml index e3f71f7..573558d 100644 --- a/melos.yaml +++ b/melos.yaml @@ -23,11 +23,11 @@ scripts: - test format: - exec: dart format . --fix + exec: dart format . description: Run `dart format` for all packages. format-check: - exec: dart format . --fix --set-exit-if-changed + exec: dart format . --set-exit-if-changed description: Run `dart format` checks for all packages. fix: diff --git a/packages/auto_updater/CHANGELOG.md b/packages/auto_updater/CHANGELOG.md index 9e4d60f..d3c4275 100644 --- a/packages/auto_updater/CHANGELOG.md +++ b/packages/auto_updater/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.1 + +* feat(macos): Add Swift Package Manager support for Sparkle. +* chore: Support Sparkle tools from CocoaPods, SwiftPM, or `AUTO_UPDATER_SPARKLE_BIN`. +* chore: Require Dart `>=3.11.0` and Flutter `>=3.41.0`. + ## 1.0.0 * First major release. diff --git a/packages/auto_updater/bin/generate_keys.dart b/packages/auto_updater/bin/generate_keys.dart index 166ffbc..d7feffa 100644 --- a/packages/auto_updater/bin/generate_keys.dart +++ b/packages/auto_updater/bin/generate_keys.dart @@ -1,33 +1,16 @@ import 'dart:convert'; import 'dart:io'; -import 'package:path/path.dart' as p; + +import 'package:auto_updater/src/sparkle_tools.dart'; Future main(List arguments) async { if (!(Platform.isMacOS || Platform.isWindows)) { throw UnsupportedError('auto_updater:generate_keys'); } - String executable = Platform.isMacOS - ? '${Directory.current.path}/macos/Pods/Sparkle/bin/generate_keys' - : p.joinAll( - [ - Directory.current.path, - 'windows', - 'flutter', - 'ephemeral', - '.plugin_symlinks', - 'auto_updater_windows', - 'windows', - 'WinSparkle-0.8.1', - 'bin', - 'generate_keys.bat', - ], - ); + final executable = sparkleToolExecutable(SparkleTool.generateKeys); - Process process = await Process.start( - executable, - arguments, - ); + final process = await Process.start(executable, arguments); process.stdout.transform(utf8.decoder).listen(stdout.write); process.stderr.transform(utf8.decoder).listen(stderr.write); diff --git a/packages/auto_updater/bin/sign_update.dart b/packages/auto_updater/bin/sign_update.dart index e427660..d227e50 100644 --- a/packages/auto_updater/bin/sign_update.dart +++ b/packages/auto_updater/bin/sign_update.dart @@ -1,61 +1,42 @@ import 'dart:io'; + +import 'package:auto_updater/src/sparkle_tools.dart'; import 'package:path/path.dart' as p; class SignUpdateResult { - const SignUpdateResult({ - required this.signature, - required this.length, - }); + const SignUpdateResult({required this.signature, required this.length}); final String signature; final int length; } SignUpdateResult signUpdate(List args) { - String executable = Platform.isMacOS - ? '${Directory.current.path}/macos/Pods/Sparkle/bin/sign_update' - : p.joinAll( - [ - Directory.current.path, - 'windows', - 'flutter', - 'ephemeral', - '.plugin_symlinks', - 'auto_updater_windows', - 'windows', - 'WinSparkle-0.8.1', - 'bin', - 'sign_update.bat', - ], - ); - List arguments = List.from(args); + final executable = sparkleToolExecutable(SparkleTool.signUpdate); + final arguments = List.from(args); if (Platform.isWindows) { if (arguments.length == 1) { arguments.add(p.join('dsa_priv.pem')); } } - ProcessResult processResult = Process.runSync( - executable, - arguments, - ); + final processResult = Process.runSync(executable, arguments); - int exitCode = processResult.exitCode; + final exitCode = processResult.exitCode; - String? signUpdateOutput; - if (exitCode == 0) { - signUpdateOutput = processResult.stdout.toString(); - if (Platform.isWindows) { - signUpdateOutput = signUpdateOutput.replaceFirst('\r\n', '').trim(); - signUpdateOutput = 'sparkle:dsaSignature="$signUpdateOutput" length="0"'; - } - stdout.write(signUpdateOutput); - } else { + if (exitCode != 0) { stderr.write(processResult.stderr); + throw Exception('Failed to sign update'); + } + + var signUpdateOutput = processResult.stdout.toString(); + if (Platform.isWindows) { + signUpdateOutput = signUpdateOutput.replaceFirst('\r\n', '').trim(); + signUpdateOutput = 'sparkle:dsaSignature="$signUpdateOutput" length="0"'; } + stdout.write(signUpdateOutput); - RegExp regex = RegExp(r'sparkle:(dsa|ed)Signature="([^"]+)" length="(\d+)"'); - RegExpMatch? match = regex.firstMatch(signUpdateOutput!); + final regex = RegExp(r'sparkle:(dsa|ed)Signature="([^"]+)" length="(\d+)"'); + final match = regex.firstMatch(signUpdateOutput); if (match == null) { throw Exception('Failed to sign update'); diff --git a/packages/auto_updater/example/lib/main.dart b/packages/auto_updater/example/lib/main.dart index 61e3d1b..6c69299 100644 --- a/packages/auto_updater/example/lib/main.dart +++ b/packages/auto_updater/example/lib/main.dart @@ -31,7 +31,7 @@ class _MyAppState extends State { primaryColor: const Color(0xff416ff4), canvasColor: Colors.white, scaffoldBackgroundColor: const Color(0xffF7F9FB), - dividerColor: Colors.grey.withOpacity(0.3), + dividerColor: Colors.grey.withValues(alpha: 0.3), ), builder: BotToastInit(), navigatorObservers: [BotToastNavigatorObserver()], diff --git a/packages/auto_updater/example/lib/pages/home.dart b/packages/auto_updater/example/lib/pages/home.dart index 6100015..e1eb74a 100644 --- a/packages/auto_updater/example/lib/pages/home.dart +++ b/packages/auto_updater/example/lib/pages/home.dart @@ -89,9 +89,7 @@ class _HomePageState extends State with UpdaterListener { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: const Text('Plugin example app'), - ), + appBar: AppBar(title: const Text('Plugin example app')), body: _buildBody(context), ); } diff --git a/packages/auto_updater/example/macos/Podfile b/packages/auto_updater/example/macos/Podfile index 049abe2..9ec46f8 100644 --- a/packages/auto_updater/example/macos/Podfile +++ b/packages/auto_updater/example/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.14' +platform :osx, '10.15' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/packages/auto_updater/example/macos/Podfile.lock b/packages/auto_updater/example/macos/Podfile.lock index 7e135f3..b2b4ff7 100644 --- a/packages/auto_updater/example/macos/Podfile.lock +++ b/packages/auto_updater/example/macos/Podfile.lock @@ -1,11 +1,11 @@ PODS: - auto_updater_macos (0.0.1): - FlutterMacOS - - Sparkle + - Sparkle (< 3.0, >= 2.9.2) - FlutterMacOS (1.0.0) - screen_retriever_macos (0.0.1): - FlutterMacOS - - Sparkle (2.5.2) + - Sparkle (2.9.2) - window_manager (0.2.0): - FlutterMacOS @@ -30,12 +30,12 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/window_manager/macos SPEC CHECKSUMS: - auto_updater_macos: 3e3462c418fe4e731917eacd8d28eef7af84086d - FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 + auto_updater_macos: d1e475f6e51b1d442776389bc778918388c5a978 + FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1 screen_retriever_macos: 776e0fa5d42c6163d2bf772d22478df4b302b161 - Sparkle: 0e335e5c704ac28dbea18cc0383e15a3927c28dc + Sparkle: 2d0c930d42d53ee0fdf98bbb342c08eaf18ab5f0 window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8 -PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7 +PODFILE CHECKSUM: 0d3963a09fc94f580682bd88480486da345dc3f0 -COCOAPODS: 1.14.3 +COCOAPODS: 1.16.2 diff --git a/packages/auto_updater/example/macos/Runner.xcodeproj/project.pbxproj b/packages/auto_updater/example/macos/Runner.xcodeproj/project.pbxproj index 10e8d82..69d5d2d 100644 --- a/packages/auto_updater/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/auto_updater/example/macos/Runner.xcodeproj/project.pbxproj @@ -27,6 +27,7 @@ 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; 346C8E3CE84E60B8B3F3F56C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDDFA89CDE7C0F2F4308E63B /* Pods_Runner.framework */; }; + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -73,6 +74,7 @@ D4A4BD0DE7C9F102C882B647 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; EDDFA89CDE7C0F2F4308E63B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F7570200DEFC70AC27D265D9 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -80,6 +82,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, 346C8E3CE84E60B8B3F3F56C /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -142,6 +145,7 @@ 33CEB47122A05771004F2AC0 /* Flutter */ = { isa = PBXGroup; children = ( + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, @@ -175,6 +179,9 @@ /* Begin PBXNativeTarget section */ 33CC10EC2044A3C60003C045 /* Runner */ = { + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( @@ -200,6 +207,9 @@ /* Begin PBXProject section */ 33CC10E52044A3C60003C045 /* Project object */ = { + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, + ); isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; @@ -405,7 +415,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -484,7 +494,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -531,7 +541,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -628,6 +638,18 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ +/* Begin XCLocalSwiftPackageReference section */ + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; + }; +/* End XCLocalSwiftPackageReference section */ +/* Begin XCSwiftPackageProductDependency section */ + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { + isa = XCSwiftPackageProductDependency; + productName = FlutterGeneratedPluginSwiftPackage; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 33CC10E52044A3C60003C045 /* Project object */; } diff --git a/packages/auto_updater/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/auto_updater/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..d4c2188 --- /dev/null +++ b/packages/auto_updater/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "sparkle", + "kind" : "remoteSourceControl", + "location" : "https://github.com/sparkle-project/Sparkle", + "state" : { + "revision" : "6276ba2b404829d139c45ff98427cf90e2efc59b", + "version" : "2.9.2" + } + } + ], + "version" : 2 +} diff --git a/packages/auto_updater/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/auto_updater/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index e911fb1..654f8d9 100644 --- a/packages/auto_updater/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/auto_updater/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -5,6 +5,24 @@ + + + + + + + + + + diff --git a/packages/auto_updater/example/macos/Runner/AppDelegate.swift b/packages/auto_updater/example/macos/Runner/AppDelegate.swift index 8e02df2..b3c1761 100644 --- a/packages/auto_updater/example/macos/Runner/AppDelegate.swift +++ b/packages/auto_updater/example/macos/Runner/AppDelegate.swift @@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/packages/auto_updater/example/pubspec.yaml b/packages/auto_updater/example/pubspec.yaml index a8d2512..67ac7b7 100644 --- a/packages/auto_updater/example/pubspec.yaml +++ b/packages/auto_updater/example/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 publish_to: "none" environment: - sdk: ">=3.0.0 <4.0.0" + sdk: ">=3.11.0 <4.0.0" dependencies: auto_updater: diff --git a/packages/auto_updater/example/windows/flutter/generated_plugin_registrant.cc b/packages/auto_updater/example/windows/flutter/generated_plugin_registrant.cc index c517ac4..b609e5c 100644 --- a/packages/auto_updater/example/windows/flutter/generated_plugin_registrant.cc +++ b/packages/auto_updater/example/windows/flutter/generated_plugin_registrant.cc @@ -7,14 +7,14 @@ #include "generated_plugin_registrant.h" #include -#include +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { AutoUpdaterWindowsPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("AutoUpdaterWindowsPluginCApi")); - ScreenRetrieverPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ScreenRetrieverPlugin")); + ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ScreenRetrieverWindowsPluginCApi")); WindowManagerPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("WindowManagerPlugin")); } diff --git a/packages/auto_updater/example/windows/flutter/generated_plugins.cmake b/packages/auto_updater/example/windows/flutter/generated_plugins.cmake index 8a8de50..f5175d6 100644 --- a/packages/auto_updater/example/windows/flutter/generated_plugins.cmake +++ b/packages/auto_updater/example/windows/flutter/generated_plugins.cmake @@ -4,7 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST auto_updater_windows - screen_retriever + screen_retriever_windows window_manager ) diff --git a/packages/auto_updater/lib/src/appcast.dart b/packages/auto_updater/lib/src/appcast.dart index f91af8e..fbf0cda 100644 --- a/packages/auto_updater/lib/src/appcast.dart +++ b/packages/auto_updater/lib/src/appcast.dart @@ -4,9 +4,7 @@ part 'appcast.g.dart'; @JsonSerializable() class Appcast { - const Appcast({ - required this.items, - }); + const Appcast({required this.items}); factory Appcast.fromJson(Map json) { json['items'] = (json['items'] as List) diff --git a/packages/auto_updater/lib/src/appcast.g.dart b/packages/auto_updater/lib/src/appcast.g.dart index a4f8925..6ff1287 100644 --- a/packages/auto_updater/lib/src/appcast.g.dart +++ b/packages/auto_updater/lib/src/appcast.g.dart @@ -7,35 +7,35 @@ part of 'appcast.dart'; // ************************************************************************** Appcast _$AppcastFromJson(Map json) => Appcast( - items: (json['items'] as List) - .map((e) => AppcastItem.fromJson(e as Map)) - .toList(), - ); + items: (json['items'] as List) + .map((e) => AppcastItem.fromJson(e as Map)) + .toList(), +); Map _$AppcastToJson(Appcast instance) => { - 'items': instance.items, - }; + 'items': instance.items, +}; AppcastItem _$AppcastItemFromJson(Map json) => AppcastItem( - versionString: json['versionString'] as String?, - displayVersionString: json['displayVersionString'] as String?, - fileURL: json['fileURL'] as String?, - contentLength: json['contentLength'] as int?, - infoURL: json['infoURL'] as String?, - title: json['title'] as String?, - dateString: json['dateString'] as String?, - releaseNotesURL: json['releaseNotesURL'] as String?, - itemDescription: json['itemDescription'] as String?, - itemDescriptionFormat: json['itemDescriptionFormat'] as String?, - fullReleaseNotesURL: json['fullReleaseNotesURL'] as String?, - minimumSystemVersion: json['minimumSystemVersion'] as String?, - minimumOperatingSystemVersionIsOK: - json['minimumOperatingSystemVersionIsOK'] as bool?, - maximumSystemVersion: json['maximumSystemVersion'] as String?, - maximumOperatingSystemVersionIsOK: - json['maximumOperatingSystemVersionIsOK'] as bool?, - channel: json['channel'] as String?, - ); + versionString: json['versionString'] as String?, + displayVersionString: json['displayVersionString'] as String?, + fileURL: json['fileURL'] as String?, + contentLength: json['contentLength'] as int?, + infoURL: json['infoURL'] as String?, + title: json['title'] as String?, + dateString: json['dateString'] as String?, + releaseNotesURL: json['releaseNotesURL'] as String?, + itemDescription: json['itemDescription'] as String?, + itemDescriptionFormat: json['itemDescriptionFormat'] as String?, + fullReleaseNotesURL: json['fullReleaseNotesURL'] as String?, + minimumSystemVersion: json['minimumSystemVersion'] as String?, + minimumOperatingSystemVersionIsOK: + json['minimumOperatingSystemVersionIsOK'] as bool?, + maximumSystemVersion: json['maximumSystemVersion'] as String?, + maximumOperatingSystemVersionIsOK: + json['maximumOperatingSystemVersionIsOK'] as bool?, + channel: json['channel'] as String?, +); Map _$AppcastItemToJson(AppcastItem instance) => { diff --git a/packages/auto_updater/lib/src/auto_updater.dart b/packages/auto_updater/lib/src/auto_updater.dart index 4f4bb2c..b5693ab 100644 --- a/packages/auto_updater/lib/src/auto_updater.dart +++ b/packages/auto_updater/lib/src/auto_updater.dart @@ -27,9 +27,7 @@ class AutoUpdater { if (event['data'] != null) { data = event['data'] as Map; if (data['error'] != null) { - updaterError = UpdaterError( - data['error'].toString(), - ); + updaterError = UpdaterError(data['error'].toString()); } if (data['appcast'] != null) { appcast = Appcast.fromJson( @@ -87,9 +85,7 @@ class AutoUpdater { /// Asks the server whether there is an update. You must call setFeedURL before using this API. Future checkForUpdates({bool? inBackground}) { - return _platform.checkForUpdates( - inBackground: inBackground, - ); + return _platform.checkForUpdates(inBackground: inBackground); } /// Sets the auto update check interval, default 86400, minimum 3600, 0 to disable update diff --git a/packages/auto_updater/lib/src/sparkle_tools.dart b/packages/auto_updater/lib/src/sparkle_tools.dart new file mode 100644 index 0000000..725f44b --- /dev/null +++ b/packages/auto_updater/lib/src/sparkle_tools.dart @@ -0,0 +1,110 @@ +import 'dart:io'; + +import 'package:path/path.dart' as p; + +enum SparkleTool { + generateKeys('generate_keys', 'generate_keys.bat'), + signUpdate('sign_update', 'sign_update.bat'); + + const SparkleTool(this.macosExecutable, this.windowsExecutable); + + final String macosExecutable; + final String windowsExecutable; +} + +class SparkleToolLookupException implements Exception { + const SparkleToolLookupException({ + required this.tool, + required this.searchedPaths, + }); + + final SparkleTool tool; + final List searchedPaths; + + @override + String toString() { + final paths = searchedPaths.map((path) => ' - $path').join('\n'); + return 'Could not find Sparkle ${tool.macosExecutable}.\n' + 'Looked in:\n' + '$paths\n\n' + 'Run `flutter build macos` to fetch Sparkle with Swift Package ' + 'Manager, run `pod install` to fetch Sparkle with CocoaPods, or set ' + 'AUTO_UPDATER_SPARKLE_BIN to the directory containing Sparkle tools.'; + } +} + +String sparkleToolExecutable( + SparkleTool tool, { + String? projectRoot, + String? operatingSystem, + Map? environment, +}) { + final currentOperatingSystem = operatingSystem ?? Platform.operatingSystem; + final currentProjectRoot = projectRoot ?? Directory.current.path; + + if (currentOperatingSystem == 'macos') { + return _macOSExecutable( + tool, + projectRoot: currentProjectRoot, + environment: environment ?? Platform.environment, + ); + } + if (currentOperatingSystem == 'windows') { + return _windowsExecutable(tool, currentProjectRoot); + } + throw UnsupportedError('auto_updater:${tool.macosExecutable}'); +} + +String _macOSExecutable( + SparkleTool tool, { + required String projectRoot, + required Map environment, +}) { + final overrideBin = environment['AUTO_UPDATER_SPARKLE_BIN']?.trim(); + final searchedPaths = overrideBin == null || overrideBin.isEmpty + ? [ + p.join( + projectRoot, + 'macos', + 'Pods', + 'Sparkle', + 'bin', + tool.macosExecutable, + ), + p.join( + projectRoot, + 'build', + 'macos', + 'SourcePackages', + 'artifacts', + 'sparkle', + 'Sparkle', + 'bin', + tool.macosExecutable, + ), + ] + : [p.join(overrideBin, tool.macosExecutable)]; + + for (final path in searchedPaths) { + if (File(path).existsSync()) { + return path; + } + } + + throw SparkleToolLookupException(tool: tool, searchedPaths: searchedPaths); +} + +String _windowsExecutable(SparkleTool tool, String projectRoot) { + return p.joinAll([ + projectRoot, + 'windows', + 'flutter', + 'ephemeral', + '.plugin_symlinks', + 'auto_updater_windows', + 'windows', + 'WinSparkle-0.8.1', + 'bin', + tool.windowsExecutable, + ]); +} diff --git a/packages/auto_updater/pubspec.yaml b/packages/auto_updater/pubspec.yaml index 8d4c2a8..ec4fb46 100644 --- a/packages/auto_updater/pubspec.yaml +++ b/packages/auto_updater/pubspec.yaml @@ -11,8 +11,8 @@ topics: - auto-updater environment: - sdk: ">=3.0.0 <4.0.0" - flutter: ">=3.3.0" + sdk: ">=3.11.0 <4.0.0" + flutter: ">=3.41.0" dependencies: auto_updater_macos: ^1.0.0 diff --git a/packages/auto_updater/test/sparkle_tools_test.dart b/packages/auto_updater/test/sparkle_tools_test.dart new file mode 100644 index 0000000..ac979c1 --- /dev/null +++ b/packages/auto_updater/test/sparkle_tools_test.dart @@ -0,0 +1,147 @@ +import 'dart:io'; + +import 'package:auto_updater/src/sparkle_tools.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:path/path.dart' as p; + +void main() { + late Directory tempDir; + + setUp(() { + tempDir = Directory.systemTemp.createTempSync('sparkle_tools_test.'); + }); + + tearDown(() { + if (tempDir.existsSync()) { + tempDir.deleteSync(recursive: true); + } + }); + + File touch(List segments) { + final file = File(p.joinAll([tempDir.path, ...segments])); + file.parent.createSync(recursive: true); + file.writeAsStringSync(''); + return file; + } + + group('macOS Sparkle tool resolution', () { + test('uses AUTO_UPDATER_SPARKLE_BIN before dependency manager paths', () { + final envTool = touch(['override', 'sign_update']); + touch(['macos', 'Pods', 'Sparkle', 'bin', 'sign_update']); + touch([ + 'build', + 'macos', + 'SourcePackages', + 'artifacts', + 'sparkle', + 'Sparkle', + 'bin', + 'sign_update', + ]); + + final executable = sparkleToolExecutable( + SparkleTool.signUpdate, + projectRoot: tempDir.path, + operatingSystem: 'macos', + environment: {'AUTO_UPDATER_SPARKLE_BIN': envTool.parent.path}, + ); + + expect(executable, envTool.path); + }); + + test('uses the CocoaPods Sparkle tool path when it exists', () { + final podTool = touch([ + 'macos', + 'Pods', + 'Sparkle', + 'bin', + 'generate_keys', + ]); + + final executable = sparkleToolExecutable( + SparkleTool.generateKeys, + projectRoot: tempDir.path, + operatingSystem: 'macos', + environment: const {}, + ); + + expect(executable, podTool.path); + }); + + test('uses the SwiftPM Sparkle artifact path when it exists', () { + final swiftPackageTool = touch([ + 'build', + 'macos', + 'SourcePackages', + 'artifacts', + 'sparkle', + 'Sparkle', + 'bin', + 'sign_update', + ]); + + final executable = sparkleToolExecutable( + SparkleTool.signUpdate, + projectRoot: tempDir.path, + operatingSystem: 'macos', + environment: const {}, + ); + + expect(executable, swiftPackageTool.path); + }); + + test('throws an actionable error when the Sparkle tool is missing', () { + expect( + () => sparkleToolExecutable( + SparkleTool.generateKeys, + projectRoot: tempDir.path, + operatingSystem: 'macos', + environment: const {}, + ), + throwsA( + isA() + .having( + (error) => error.toString(), + 'message', + contains('Could not find Sparkle generate_keys'), + ) + .having( + (error) => error.toString(), + 'build hint', + contains('flutter build macos'), + ) + .having( + (error) => error.toString(), + 'override hint', + contains('AUTO_UPDATER_SPARKLE_BIN'), + ), + ), + ); + }); + }); + + test('keeps the Windows WinSparkle path unchanged', () { + final executable = sparkleToolExecutable( + SparkleTool.signUpdate, + projectRoot: tempDir.path, + operatingSystem: 'windows', + environment: const {}, + ); + + expect( + executable, + p.joinAll([ + tempDir.path, + 'windows', + 'flutter', + 'ephemeral', + '.plugin_symlinks', + 'auto_updater_windows', + 'windows', + 'WinSparkle-0.8.1', + 'bin', + 'sign_update.bat', + ]), + ); + }); +} diff --git a/packages/auto_updater_macos/CHANGELOG.md b/packages/auto_updater_macos/CHANGELOG.md index ada13fa..4b7db10 100644 --- a/packages/auto_updater_macos/CHANGELOG.md +++ b/packages/auto_updater_macos/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.1 + +* feat: Add Swift Package Manager support. +* chore: Upgrade Sparkle dependency to `>=2.9.2 <3.0`. +* chore: Require macOS `10.15`, Dart `>=3.11.0`, and Flutter `>=3.41.0`. + ## 1.0.0 * First major release. diff --git a/packages/auto_updater_macos/macos/auto_updater_macos.podspec b/packages/auto_updater_macos/macos/auto_updater_macos.podspec index 233a0d4..bc22fc0 100644 --- a/packages/auto_updater_macos/macos/auto_updater_macos.podspec +++ b/packages/auto_updater_macos/macos/auto_updater_macos.podspec @@ -14,11 +14,11 @@ A new Flutter plugin project. s.author = { 'Your Company' => 'email@example.com' } s.source = { :path => '.' } - s.source_files = 'Classes/**/*' + s.source_files = 'auto_updater_macos/Sources/auto_updater_macos/**/*' s.dependency 'FlutterMacOS' - s.dependency 'Sparkle' + s.dependency 'Sparkle', '>= 2.9.2', '< 3.0' - s.platform = :osx, '10.11' + s.platform = :osx, '10.15' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } s.swift_version = '5.0' end diff --git a/packages/auto_updater_macos/macos/auto_updater_macos/Package.swift b/packages/auto_updater_macos/macos/auto_updater_macos/Package.swift new file mode 100644 index 0000000..4980ac8 --- /dev/null +++ b/packages/auto_updater_macos/macos/auto_updater_macos/Package.swift @@ -0,0 +1,27 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "auto_updater_macos", + platforms: [ + .macOS("10.15") + ], + products: [ + .library(name: "auto-updater-macos", targets: ["auto_updater_macos"]) + ], + dependencies: [ + .package(name: "FlutterFramework", path: "../FlutterFramework"), + .package(url: "https://github.com/sparkle-project/Sparkle", from: "2.9.2") + ], + targets: [ + .target( + name: "auto_updater_macos", + dependencies: [ + .product(name: "FlutterFramework", package: "FlutterFramework"), + .product(name: "Sparkle", package: "Sparkle") + ] + ) + ] +) diff --git a/packages/auto_updater_macos/macos/Classes/AutoUpdater.swift b/packages/auto_updater_macos/macos/auto_updater_macos/Sources/auto_updater_macos/AutoUpdater.swift similarity index 100% rename from packages/auto_updater_macos/macos/Classes/AutoUpdater.swift rename to packages/auto_updater_macos/macos/auto_updater_macos/Sources/auto_updater_macos/AutoUpdater.swift diff --git a/packages/auto_updater_macos/macos/Classes/AutoUpdaterMacosPlugin.swift b/packages/auto_updater_macos/macos/auto_updater_macos/Sources/auto_updater_macos/AutoUpdaterMacosPlugin.swift similarity index 100% rename from packages/auto_updater_macos/macos/Classes/AutoUpdaterMacosPlugin.swift rename to packages/auto_updater_macos/macos/auto_updater_macos/Sources/auto_updater_macos/AutoUpdaterMacosPlugin.swift diff --git a/packages/auto_updater_macos/pubspec.yaml b/packages/auto_updater_macos/pubspec.yaml index f26e44f..b726d4f 100644 --- a/packages/auto_updater_macos/pubspec.yaml +++ b/packages/auto_updater_macos/pubspec.yaml @@ -4,8 +4,8 @@ version: 1.0.0 repository: https://github.com/leanflutter/auto_updater/tree/main/packages/auto_updater_macos environment: - sdk: '>=3.0.0 <4.0.0' - flutter: '>=3.3.0' + sdk: '>=3.11.0 <4.0.0' + flutter: '>=3.41.0' dependencies: flutter: @@ -23,4 +23,3 @@ flutter: platforms: macos: pluginClass: AutoUpdaterMacosPlugin - diff --git a/packages/auto_updater_platform_interface/CHANGELOG.md b/packages/auto_updater_platform_interface/CHANGELOG.md index ada13fa..4bbca2c 100644 --- a/packages/auto_updater_platform_interface/CHANGELOG.md +++ b/packages/auto_updater_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.1 + +* chore: Require Dart `>=3.11.0` and Flutter `>=3.41.0`. + ## 1.0.0 * First major release. diff --git a/packages/auto_updater_platform_interface/lib/src/auto_updater_method_channel.dart b/packages/auto_updater_platform_interface/lib/src/auto_updater_method_channel.dart index 9af60b9..9ccb69b 100644 --- a/packages/auto_updater_platform_interface/lib/src/auto_updater_method_channel.dart +++ b/packages/auto_updater_platform_interface/lib/src/auto_updater_method_channel.dart @@ -23,9 +23,7 @@ class MethodChannelAutoUpdater extends AutoUpdaterPlatform { @override Future setFeedURL(String feedUrl) async { - final Map arguments = { - 'feedURL': feedUrl, - }; + final Map arguments = {'feedURL': feedUrl}; await methodChannel.invokeMethod('setFeedURL', arguments); } @@ -39,9 +37,7 @@ class MethodChannelAutoUpdater extends AutoUpdaterPlatform { @override Future setScheduledCheckInterval(int interval) async { - final Map arguments = { - 'interval': interval, - }; + final Map arguments = {'interval': interval}; await methodChannel.invokeMethod('setScheduledCheckInterval', arguments); } } diff --git a/packages/auto_updater_platform_interface/pubspec.yaml b/packages/auto_updater_platform_interface/pubspec.yaml index 1f82854..340cb8a 100644 --- a/packages/auto_updater_platform_interface/pubspec.yaml +++ b/packages/auto_updater_platform_interface/pubspec.yaml @@ -4,8 +4,8 @@ version: 1.0.0 homepage: https://github.com/leanflutter/auto_updater/blob/main/packages/auto_updater_platform_interface environment: - sdk: '>=3.0.0 <4.0.0' - flutter: '>=3.3.0' + sdk: '>=3.11.0 <4.0.0' + flutter: '>=3.41.0' dependencies: flutter: diff --git a/packages/auto_updater_windows/CHANGELOG.md b/packages/auto_updater_windows/CHANGELOG.md index cce5457..78f20c8 100644 --- a/packages/auto_updater_windows/CHANGELOG.md +++ b/packages/auto_updater_windows/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.1 + +* chore: Require Dart `>=3.11.0` and Flutter `>=3.41.0`. + ## 1.0.0 * First major release. diff --git a/packages/auto_updater_windows/pubspec.yaml b/packages/auto_updater_windows/pubspec.yaml index f3b739c..520c988 100644 --- a/packages/auto_updater_windows/pubspec.yaml +++ b/packages/auto_updater_windows/pubspec.yaml @@ -4,8 +4,8 @@ version: 1.0.0 repository: https://github.com/leanflutter/auto_updater/tree/main/packages/auto_updater_windows environment: - sdk: '>=3.0.0 <4.0.0' - flutter: '>=3.3.0' + sdk: '>=3.11.0 <4.0.0' + flutter: '>=3.41.0' dependencies: flutter: diff --git a/pubspec.yaml b/pubspec.yaml index f131cb2..16cb29b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ homepage: https://github.com/leanflutter/auto_updater publish_to: none environment: - sdk: ">=3.0.0 <4.0.0" + sdk: ">=3.11.0 <4.0.0" dev_dependencies: melos: ^6.2.0 From 7e9e5cb08e385bd3b882f11e1d9e8796d4e71697 Mon Sep 17 00:00:00 2001 From: Daniel Hoer Date: Mon, 1 Jun 2026 20:39:19 +0200 Subject: [PATCH 2/3] ci: clear SwiftPM artifact cache --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 071f4bf..d8d3edd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,6 +35,7 @@ jobs: - uses: bluefireteam/melos-action@v3 - working-directory: ./packages/auto_updater/example run: | + rm -rf "$HOME/Library/Caches/org.swift.swiftpm/artifacts" flutter build macos --release # build-web: From 56dc406f6e0f6ccf01d70d2fbc88f7ca1c3ebf9a Mon Sep 17 00:00:00 2001 From: Daniel Hoer Date: Mon, 1 Jun 2026 21:08:58 +0200 Subject: [PATCH 3/3] Fix open PR bug reports --- packages/auto_updater/pubspec.yaml | 8 ++++---- packages/auto_updater_macos/pubspec.yaml | 2 +- packages/auto_updater_platform_interface/pubspec.yaml | 2 +- packages/auto_updater_windows/pubspec.yaml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/auto_updater/pubspec.yaml b/packages/auto_updater/pubspec.yaml index ec4fb46..ec6ca1f 100644 --- a/packages/auto_updater/pubspec.yaml +++ b/packages/auto_updater/pubspec.yaml @@ -1,6 +1,6 @@ name: auto_updater description: This plugin allows Flutter desktop apps to automatically update themselves (based on sparkle and winsparkle). -version: 1.0.0 +version: 1.0.1 homepage: https://github.com/leanflutter/auto_updater platforms: @@ -15,9 +15,9 @@ environment: flutter: ">=3.41.0" dependencies: - auto_updater_macos: ^1.0.0 - auto_updater_platform_interface: ^1.0.0 - auto_updater_windows: ^1.0.0 + auto_updater_macos: ^1.0.1 + auto_updater_platform_interface: ^1.0.1 + auto_updater_windows: ^1.0.1 flutter: sdk: flutter json_annotation: ^4.8.0 diff --git a/packages/auto_updater_macos/pubspec.yaml b/packages/auto_updater_macos/pubspec.yaml index b726d4f..aeffa93 100644 --- a/packages/auto_updater_macos/pubspec.yaml +++ b/packages/auto_updater_macos/pubspec.yaml @@ -1,6 +1,6 @@ name: auto_updater_macos description: macOS implementation of the auto_updater plugin. -version: 1.0.0 +version: 1.0.1 repository: https://github.com/leanflutter/auto_updater/tree/main/packages/auto_updater_macos environment: diff --git a/packages/auto_updater_platform_interface/pubspec.yaml b/packages/auto_updater_platform_interface/pubspec.yaml index 340cb8a..1a3d473 100644 --- a/packages/auto_updater_platform_interface/pubspec.yaml +++ b/packages/auto_updater_platform_interface/pubspec.yaml @@ -1,6 +1,6 @@ name: auto_updater_platform_interface description: A common platform interface for the auto_updater plugin. -version: 1.0.0 +version: 1.0.1 homepage: https://github.com/leanflutter/auto_updater/blob/main/packages/auto_updater_platform_interface environment: diff --git a/packages/auto_updater_windows/pubspec.yaml b/packages/auto_updater_windows/pubspec.yaml index 520c988..84c64fa 100644 --- a/packages/auto_updater_windows/pubspec.yaml +++ b/packages/auto_updater_windows/pubspec.yaml @@ -1,6 +1,6 @@ name: auto_updater_windows description: Windows implementation of the auto_updater plugin. -version: 1.0.0 +version: 1.0.1 repository: https://github.com/leanflutter/auto_updater/tree/main/packages/auto_updater_windows environment: