Skip to content

Commit 6de804f

Browse files
enedclaude
andcommitted
fix: Improve federated plugin documentation and melos CI setup
Documentation improvements: - Simplify platform package READMEs to avoid duplication and maintenance burden - Remove detailed setup/limitations from platform packages, keeping only basic usage - All comprehensive documentation remains in the main workmanager package - Follow industry best practices from permission_handler and url_launcher CI improvements: - Add Flutter/Dart version verification step in analysis workflow - Use melos bootstrap --sdk-path auto to ensure proper SDK detection - Fix mixed Dart/Flutter package resolution issues in CI environment This follows federated plugin best practices where platform packages have minimal READMEs directing users to the main package documentation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 27e94ce commit 6de804f

File tree

3 files changed

+13
-67
lines changed

3 files changed

+13
-67
lines changed

.github/workflows/analysis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ jobs:
1313
with:
1414
channel: "stable"
1515
cache: true
16+
- name: Verify Flutter and Dart are available
17+
run: |
18+
flutter --version
19+
dart --version
1620
- name: bootstrap
1721
run: |
1822
dart pub global activate melos
19-
melos bootstrap
23+
melos bootstrap --sdk-path auto
2024
- uses: axel-op/dart-package-analyzer@v3
2125
with:
2226
githubToken: ${{ secrets.GITHUB_TOKEN }}

workmanager_android/README.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,10 @@ dependencies:
1818
workmanager_android: ^0.8.0
1919
```
2020
21-
## Android setup
21+
## Documentation
2222
23-
Add the following to your `android/app/src/main/AndroidManifest.xml`:
24-
25-
```xml
26-
<!-- Background processing permissions -->
27-
<uses-permission android:name="android.permission.WAKE_LOCK" />
28-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
29-
```
30-
31-
For more detailed setup instructions, see the [Android setup documentation][android_setup].
32-
33-
## Features
34-
35-
This Android implementation supports:
36-
37-
- **One-off tasks**: Execute background tasks once after a delay
38-
- **Periodic tasks**: Execute background tasks repeatedly at specified intervals
39-
- **Task constraints**: Network, charging, battery, storage, and device idle requirements
40-
- **Task cancellation**: Cancel individual tasks or all tasks
41-
- **Work policies**: Configure what happens when tasks with the same unique name are registered
42-
- **Backoff policies**: Configure retry behavior for failed tasks
43-
- **Task scheduling info**: Check if periodic tasks are currently scheduled
44-
45-
## Limitations
46-
47-
- Processing tasks are not supported on Android (use one-off tasks instead)
48-
- Tag-based operations work with individual tasks
49-
- iOS-specific features like `printScheduledTasks` are not available
23+
For detailed setup instructions, usage examples, and platform-specific information,
24+
please refer to the main [`workmanager`][workmanager] package documentation.
5025

5126
[workmanager]: https://pub.dartlang.org/packages/workmanager
52-
[federated_plugin_docs]: https://flutter.dev/go/federated-plugins
53-
[android_setup]: https://github.com/fluttercommunity/flutter_workmanager/blob/main/ANDROID_SETUP.md
27+
[federated_plugin_docs]: https://flutter.dev/go/federated-plugins

workmanager_ios/README.md

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,10 @@ dependencies:
1818
workmanager_ios: ^0.8.0
1919
```
2020
21-
## iOS setup
21+
## Documentation
2222
23-
For iOS background processing, you need to configure your app properly.
24-
For detailed setup instructions, see the [iOS setup documentation][ios_setup].
25-
26-
## Features
27-
28-
This iOS implementation supports:
29-
30-
- **One-off tasks**: Execute background tasks once using BGTaskScheduler (iOS 13+)
31-
- **Periodic tasks**: Execute background tasks using BGAppRefreshTask (iOS 13+) or Background Fetch
32-
- **Processing tasks**: Execute long-running background tasks using BGProcessingTask (iOS 13+)
33-
- **Task cancellation**: Cancel individual tasks or all tasks
34-
- **Task constraints**: Network and charging requirements (iOS 13+)
35-
- **Task scheduling info**: Print information about scheduled tasks (iOS 13+)
36-
37-
## Limitations
38-
39-
- **iOS 13+ required**: BGTaskScheduler features require iOS 13 or later
40-
- **Tags not supported**: `cancelByTag` operations are not available on iOS
41-
- **No scheduling status**: `isScheduledByUniqueName` is not supported on iOS
42-
- **Background execution limits**: iOS strictly limits background execution time and frequency
43-
- **System scheduling**: iOS determines when tasks actually run based on user behavior and system resources
44-
45-
## Background execution on iOS
46-
47-
Please note that iOS has strict limitations on background execution:
48-
49-
- Background tasks are scheduled by the system and may not run immediately
50-
- The system considers user behavior patterns when scheduling background work
51-
- Tasks may be throttled or denied if the app is used infrequently
52-
- Background App Refresh must be enabled by the user for your app
53-
54-
For more information, see Apple's [Background Tasks documentation][apple_background_tasks].
23+
For detailed setup instructions, usage examples, and platform-specific information,
24+
please refer to the main [`workmanager`][workmanager] package documentation.
5525

5626
[workmanager]: https://pub.dartlang.org/packages/workmanager
57-
[federated_plugin_docs]: https://flutter.dev/go/federated-plugins
58-
[ios_setup]: https://github.com/fluttercommunity/flutter_workmanager/blob/main/IOS_SETUP.md
59-
[apple_background_tasks]: https://developer.apple.com/documentation/backgroundtasks
27+
[federated_plugin_docs]: https://flutter.dev/go/federated-plugins

0 commit comments

Comments
 (0)