diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml
index 66b4ef08..47b562a7 100644
--- a/.github/workflows/examples.yml
+++ b/.github/workflows/examples.yml
@@ -11,9 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-java@v1
+ - uses: actions/setup-java@v4
with:
- java-version: 17
+ distribution: 'temurin'
+ java-version: '21'
- uses: subosito/flutter-action@v2
with:
channel: "stable"
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index 671dbed6..075fea26 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -12,7 +12,7 @@ jobs:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- - uses: amannn/action-semantic-pull-request@v5.2.0
+ - uses: amannn/action-semantic-pull-request@v5.4.0
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 9063cdd6..188f0a3c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -28,24 +28,37 @@ jobs:
with:
channel: 'stable'
- name: Build iOS App
- run: cd example && flutter build ios --debug --no-codesign
+ run: |
+ dart pub global activate melos
+ melos bootstrap
+ cd example && flutter build ios --debug --no-codesign
- name: Run native iOS tests
- run: cd example/ios && xcodebuild -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12,OS=16.2' test
+ run: |
+ dart pub global activate melos
+ melos bootstrap
+ cd example/ios && xcodebuild -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12,OS=16.2' test
native_android_tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-java@v1
+ - uses: actions/setup-java@v4
with:
- java-version: 17
+ distribution: 'temurin'
+ java-version: '21'
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Build Android App
- run: cd example && flutter build apk --debug
+ run: |
+ dart pub global activate melos
+ melos bootstrap
+ cd example && flutter build apk --debug
- name: Run native Android tests
- run: cd example/android && gradle workmanager:test
+ run: |
+ dart pub global activate melos
+ melos bootstrap
+ cd example/android && gradle workmanager:test
drive_ios:
strategy:
@@ -55,7 +68,7 @@ jobs:
fail-fast: false
runs-on: macos-latest
steps:
- - uses: futureware-tech/simulator-action@v1
+ - uses: futureware-tech/simulator-action@v3
with:
model: '${{ matrix.device }}'
- uses: actions/checkout@v4
@@ -64,7 +77,10 @@ jobs:
channel: 'stable'
# Run flutter integrate tests
- name: Run Flutter integration tests
- run: cd example && flutter test integration_test/workmanager_integration_test.dart
+ run: |
+ dart pub global activate melos
+ melos bootstrap
+ cd example && flutter test integration_test/workmanager_integration_test.dart
drive_android:
@@ -78,9 +94,10 @@ jobs:
target: [default]
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-java@v1
+ - uses: actions/setup-java@v4
with:
- java-version: 17
+ distribution: 'temurin'
+ java-version: '21'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
diff --git a/docs/android.mdx b/docs/android.mdx
new file mode 100644
index 00000000..6c519a66
--- /dev/null
+++ b/docs/android.mdx
@@ -0,0 +1,24 @@
+# Check your AndroidManifest.xml
+
+Check if you have the following in your `AndroidManifest.xml` file.
+
+```xml
+
+```
+
+Ideally you should have this, if not follow the [upgrade guide](https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects).
+If for some reason you can't upgrade yet we still support the [older way of embedding](ANDROID_SETUP_V1.md):
+
+# How to Debug my background job
+
+Debugging a background task can be difficult, Android decides when is the best time to run.
+There is no guaranteed way to enforce a run of a job even in debug mode.
+
+However to facilitate debugging, the plugin provides an `isInDebugMode` flag when initializing the plugin: `Workmanager().initialize(callbackDispatcher, isInDebugMode: true)`
+
+Once this flag is enabled you will receive a notification whenever a background task was triggered.
+This way you can keep track whether that task ran successfully or not.
+
+