Skip to content

Commit 3e3e7df

Browse files
committed
Merge branch 'main' into modernize-plugin
Resolve conflicts by choosing: - Our modern SDK constraints (Dart >=3.2.0) - Latest Android versions from main (AGP 8.10.1, Kotlin 2.1.0, Gradle 8.11.1) - Latest targetSdkVersion 35 - Our iOS simulator OS=latest (more flexible than fixed 17.4) - Consolidated KVM setup for Android emulator
2 parents a6066ce + 5d85ebb commit 3e3e7df

9 files changed

Lines changed: 424 additions & 17 deletions

File tree

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ jobs:
9898
target: [default]
9999
steps:
100100
- uses: actions/checkout@v4
101+
- name: Enable KVM
102+
run: |
103+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
104+
sudo udevadm control --reload-rules
105+
sudo udevadm trigger --name-match=kvm
101106
- uses: actions/setup-java@v4
102107
with:
103108
distribution: 'temurin'
@@ -106,11 +111,6 @@ jobs:
106111
with:
107112
channel: 'stable'
108113
cache: true
109-
- name: Enable KVM group perms
110-
run: |
111-
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
112-
sudo udevadm control --reload-rules
113-
sudo udevadm trigger --name-match=kvm
114114
- name: Install melos
115115
run: dart pub global activate melos
116116
- name: Bootstrap packages

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Flutter WorkManager is a wrapper around [Android's WorkManager](https://developer.android.com/topic/libraries/architecture/workmanager), [iOS' performFetchWithCompletionHandler](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623125-application) and [iOS BGAppRefreshTask](https://developer.apple.com/documentation/backgroundtasks/bgapprefreshtask), effectively enabling headless execution of Dart code in the background.
88

9-
For iOS users, please watch this video on a general introduction to background processing: https://developer.apple.com/videos/play/wwdc2020/10063. All of the constraints discussed in the video also apply to this plugin.
9+
For iOS users, please watch this video on a general introduction to background processing: https://developer.apple.com/videos/play/wwdc2019/707 ( and old link for [Background execution demystified (WWDC 2020)](https://devstreaming-cdn.apple.com/videos/wwdc/2020/10063/3/2E1C3BA0-2643-4330-A5B2-3A9878453987/wwdc2020_10063_hd.mp4). All of the constraints discussed in the video also apply to this plugin.
1010

1111
This is especially useful to run periodic tasks, such as fetching remote data on a regular basis.
1212

@@ -345,3 +345,33 @@ Workmanager().cancelByUniqueName("<MyTask>");
345345
```dart
346346
Workmanager().cancelAll();
347347
```
348+
349+
350+
# Building project
351+
352+
Project was migrated to [Melos](https://pub.dev/packages/melos) so build steps has changed.
353+
354+
1. Install melos
355+
356+
```
357+
dart pub global activate melos
358+
```
359+
360+
2. In project root bootstrap
361+
362+
```
363+
melos bootstrap
364+
```
365+
366+
3. Get packages
367+
368+
```
369+
melos run get
370+
```
371+
372+
Now you should be able to run example project
373+
374+
```
375+
cd example
376+
flutter run
377+
```

example/android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ android {
3939
applicationId "dev.fluttercommunity.workmanager.example"
4040
compileSdk 35
4141
minSdkVersion flutter.minSdkVersion
42-
targetSdkVersion 34
42+
targetSdkVersion 35
4343
versionCode flutterVersionCode.toInteger()
4444
versionName flutterVersionName
4545
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -54,13 +54,13 @@ android {
5454
}
5555

5656
compileOptions {
57-
sourceCompatibility JavaVersion.VERSION_1_8
58-
targetCompatibility JavaVersion.VERSION_1_8
57+
sourceCompatibility JavaVersion.VERSION_17
58+
targetCompatibility JavaVersion.VERSION_17
5959
}
6060

6161
kotlinOptions {
6262
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
63-
kotlinOptions.jvmTarget = "1.8"
63+
kotlinOptions.jvmTarget = "17"
6464
}
6565
}
6666

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "com.github.ben-manes.versions" version "0.41.0"
2+
id "com.github.ben-manes.versions" version "0.52.0"
33
}
44

55
allprojects {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Jul 18 19:59:15 CEST 2019
1+
#Fri May 30 01:37:19 JST 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip

example/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "8.3.0" apply false
22-
id "org.jetbrains.kotlin.android" version "1.9.23" apply false
21+
id "com.android.application" version '8.10.1' apply false
22+
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
2323
}
2424

2525
include ":app"

workmanager/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# next
1+
# 0.6.0
22

33
* Android: Removed jetifier
44
* Android: Removed V1 plugin APIs - this is now a Android V2 plugin only

0 commit comments

Comments
 (0)