Skip to content

Commit cfc4838

Browse files
authored
chore: Melos restructure (#544)
* restructure * do not include override file in repo * add ignores * removed ignores files * clean up test * syntax error * formtting * swift formatting * formatting * formatting * publish check * move license
1 parent 6a09b41 commit cfc4838

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+447
-380
lines changed

.github/workflows/format.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,19 @@ jobs:
1616
channel: 'stable'
1717
- name: Format
1818
run: |
19-
flutter format --set-exit-if-changed .
19+
dart format --set-exit-if-changed .
2020
2121
format_kotlin:
2222
runs-on: ubuntu-latest
2323

2424
steps:
2525
- name: "checkout"
26-
- uses: actions/checkout@v4
26+
uses: actions/checkout@v4
2727

28-
- name: "ktlint"
29-
uses: "vroy/gha-kotlin-linter@v1"
28+
- name: ktlint
29+
uses: ScaCap/action-ktlint@master
30+
with:
31+
github_token: ${{ secrets.github_token }}
3032

3133
format_swift:
3234
runs-on: ubuntu-latest
@@ -45,6 +47,7 @@ jobs:
4547

4648
- name: publish checks
4749
run: |
50+
cd workmanager
4851
flutter pub get
4952
flutter pub publish -n
5053
flutter pub global activate tuneup

.github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
channel: 'stable'
1717
- name: Test
1818
run: |
19+
cd workmanager
1920
flutter pub get
2021
flutter test
2122

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ doc/api/*/
1515
.fvm
1616
*.iml
1717
.dccache
18+
19+
20+
pubspec_overrides.yaml

android/src/test/java/ExtractorTests.kt

-50
This file was deleted.

example/.gitignore

+11-40
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.buildlog/
99
.history
1010
.svn/
11+
migrate_working_dir/
1112

1213
# IntelliJ related
1314
*.iml
@@ -22,51 +23,21 @@
2223

2324
# Flutter/Dart/Pub related
2425
**/doc/api/
26+
**/ios/Flutter/.last_build_id
2527
.dart_tool/
2628
.flutter-plugins
27-
.packages
29+
.flutter-plugins-dependencies
2830
.pub-cache/
2931
.pub/
3032
/build/
3133

32-
# Android related
33-
**/android/**/gradle-wrapper.jar
34-
**/android/.gradle
35-
**/android/captures/
36-
**/android/gradlew
37-
**/android/gradlew.bat
38-
**/android/local.properties
39-
**/android/**/GeneratedPluginRegistrant.java
34+
# Symbolication related
35+
app.*.symbols
4036

41-
# iOS/XCode related
42-
**/ios/**/*.mode1v3
43-
**/ios/**/*.mode2v3
44-
**/ios/**/*.moved-aside
45-
**/ios/**/*.pbxuser
46-
**/ios/**/*.perspectivev3
47-
**/ios/**/*sync/
48-
**/ios/**/.sconsign.dblite
49-
**/ios/**/.tags*
50-
**/ios/**/.vagrant/
51-
**/ios/**/DerivedData/
52-
**/ios/**/Icon?
53-
**/ios/**/Pods/
54-
**/ios/**/.symlinks/
55-
**/ios/**/profile
56-
**/ios/**/xcuserdata
57-
**/ios/.generated/
58-
**/ios/Flutter/App.framework
59-
**/ios/Flutter/Flutter.framework
60-
**/ios/Flutter/Generated.xcconfig
61-
**/ios/Flutter/app.flx
62-
**/ios/Flutter/app.zip
63-
**/ios/Flutter/flutter_assets/
64-
**/ios/ServiceDefinitions.json
65-
**/ios/Runner/GeneratedPluginRegistrant.*
37+
# Obfuscation related
38+
app.*.map.json
6639

67-
# Exceptions to above rules.
68-
!**/ios/**/default.mode1v3
69-
!**/ios/**/default.mode2v3
70-
!**/ios/**/default.pbxuser
71-
!**/ios/**/default.perspectivev3
72-
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
40+
# Android Studio will place build artifacts here
41+
/android/app/debug
42+
/android/app/profile
43+
/android/app/release

example/android/.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks

example/android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ android {
3737

3838
defaultConfig {
3939
applicationId "dev.fluttercommunity.workmanager.example"
40-
compileSdk 33
40+
compileSdk 34
4141
minSdkVersion 19
42-
targetSdkVersion 33
42+
targetSdkVersion 34
4343
versionCode flutterVersionCode.toInteger()
4444
versionName flutterVersionName
4545
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

example/ios/.gitignore

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
**/dgph
2+
*.mode1v3
3+
*.mode2v3
4+
*.moved-aside
5+
*.pbxuser
6+
*.perspectivev3
7+
**/*sync/
8+
.sconsign.dblite
9+
.tags*
10+
**/.vagrant/
11+
**/DerivedData/
12+
Icon?
13+
**/Pods/
14+
**/.symlinks/
15+
profile
16+
xcuserdata
17+
**/.generated/
18+
Flutter/App.framework
19+
Flutter/Flutter.framework
20+
Flutter/Flutter.podspec
21+
Flutter/Generated.xcconfig
22+
Flutter/ephemeral/
23+
Flutter/app.flx
24+
Flutter/app.zip
25+
Flutter/flutter_assets/
26+
Flutter/flutter_export_environment.sh
27+
ServiceDefinitions.json
28+
Runner/GeneratedPluginRegistrant.*
29+
30+
# Exceptions to above rules.
31+
!default.mode1v3
32+
!default.mode2v3
33+
!default.pbxuser
34+
!default.perspectivev3

example/ios/Flutter/.last_build_id

-1
This file was deleted.

example/ios/Flutter/AppFrameworkInfo.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>11.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

example/ios/Flutter/Flutter.podspec

-18
This file was deleted.

example/ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
platform :ios, '11.0'
2+
platform :ios, '12.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

example/ios/Podfile.lock

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ PODS:
1414
DEPENDENCIES:
1515
- Flutter (from `Flutter`)
1616
- integration_test (from `.symlinks/plugins/integration_test/ios`)
17-
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
18-
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`)
17+
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
18+
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
1919
- workmanager (from `.symlinks/plugins/workmanager/ios`)
2020

2121
EXTERNAL SOURCES:
@@ -24,19 +24,19 @@ EXTERNAL SOURCES:
2424
integration_test:
2525
:path: ".symlinks/plugins/integration_test/ios"
2626
path_provider_foundation:
27-
:path: ".symlinks/plugins/path_provider_foundation/ios"
27+
:path: ".symlinks/plugins/path_provider_foundation/darwin"
2828
shared_preferences_foundation:
29-
:path: ".symlinks/plugins/shared_preferences_foundation/ios"
29+
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
3030
workmanager:
3131
:path: ".symlinks/plugins/workmanager/ios"
3232

3333
SPEC CHECKSUMS:
34-
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
35-
integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5
36-
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
37-
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
34+
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
35+
integration_test: 13825b8a9334a850581300559b8839134b124670
36+
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
37+
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
3838
workmanager: 0afdcf5628bbde6924c21af7836fed07b42e30e6
3939

40-
PODFILE CHECKSUM: 1f97605dfe28dbf01a36d8763312d21d5d00222c
40+
PODFILE CHECKSUM: b63d507eb7cc768afa26646638aaf07f371f6370
4141

42-
COCOAPODS: 1.12.0
42+
COCOAPODS: 1.14.3

example/ios/Runner.xcodeproj/project.pbxproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
isa = PBXProject;
227227
attributes = {
228228
LastSwiftUpdateCheck = 1250;
229-
LastUpgradeCheck = 1300;
229+
LastUpgradeCheck = 1510;
230230
ORGANIZATIONNAME = "The Chromium Authors";
231231
TargetAttributes = {
232232
97C146ED1CF9000F007C117D = {
@@ -307,6 +307,7 @@
307307
files = (
308308
);
309309
inputPaths = (
310+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
310311
);
311312
name = "Thin Binary";
312313
outputPaths = (

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1300"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

example/ios/Runner/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import workmanager
2323
WorkmanagerPlugin.registerBGProcessingTask(withIdentifier: "be.tramckrijte.workmanagerExample.taskId")
2424
WorkmanagerPlugin.registerBGProcessingTask(withIdentifier: "be.tramckrijte.workmanagerExample.rescheduledTask")
2525
WorkmanagerPlugin.registerBGProcessingTask(withIdentifier: "be.tramckrijte.workmanagerExample.simpleDelayedTask")
26-
WorkmanagerPlugin.registerBGProcessingTask(withIdentifier: "be.tramckrijte.workmanagerExample.iOSBackgroundProcessingTask")
26+
WorkmanagerPlugin.registerBGProcessingTask(withIdentifier: "be.tramckrijte.workmanagerExample.iOSBackgroundProcessingTask")
2727

2828
// When this task is scheduled from dart it will run with minimum 20 minute frequency. The
2929
// frequency is not guaranteed rather iOS will schedule it as per user's App usage pattern.

example/lib/main.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ class _MyAppState extends State<MyApp> {
277277
child: Text("isscheduled (Android)"),
278278
onPressed: Platform.isAndroid
279279
? () async {
280-
final workInfo = await Workmanager().isScheduledByUniqueName(
280+
final workInfo =
281+
await Workmanager().isScheduledByUniqueName(
281282
simplePeriodicTask,
282283
);
283284
print('isscheduled = $workInfo');

example/pubspec.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ dependencies:
1010
shared_preferences: ^2.2.1
1111
flutter:
1212
sdk: flutter
13+
workmanager:
1314

1415
dev_dependencies:
1516
integration_test:
1617
sdk: flutter
1718
flutter_test:
1819
sdk: flutter
1920

20-
workmanager:
21-
path: ../
22-
2321
flutter:
2422
uses-material-design: true

melos.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: workmanager
2+
packages:
3+
- workmanager
4+
- example
5+
scripts:
6+
get: melos exec -- dart pub get
7+
8+
generate:dart:
9+
run: melos exec -c 1 --depends-on="build_runner" --no-flutter -- "dart run build_runner build --delete-conflicting-outputs"
10+
description: Build all generated files for Dart packages in this project.

0 commit comments

Comments
 (0)