Skip to content

Commit b6a32e6

Browse files
committed
chore: update project configuration and dependencies
- Added FVM version cache to .gitignore files. - Updated melos.yaml to include commands for building iOS with and without Swift Package Manager. - Modified GitHub Actions workflow for iOS builds to utilize new build commands. - Updated .gitignore in flutter_image_compress to exclude build artifacts. - Added new Swift package files for Flutter integration in flutter_image_compress example. - Updated pubspec.lock to reflect dependency version changes. Signed-off-by: Caijinglong <cjl_spy@163.com>
1 parent 4c1d535 commit b6a32e6

File tree

11 files changed

+121
-23
lines changed

11 files changed

+121
-23
lines changed

.github/workflows/runnable.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
17-
os: [ ubuntu-latest ]
17+
os: [ubuntu-latest]
1818
steps:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-java@v4
2121
with:
22-
distribution: 'zulu'
23-
java-version: '17'
22+
distribution: "zulu"
23+
java-version: "17"
2424
- uses: subosito/flutter-action@v2
2525
with:
26-
channel: 'stable'
26+
channel: "stable"
2727
- name: Log Dart/Flutter versions
2828
run: |
2929
dart --version
@@ -42,42 +42,45 @@ jobs:
4242
runs-on: ${{ matrix.os }}
4343
strategy:
4444
matrix:
45-
os: [ macos-latest ]
45+
os: [macos-latest]
46+
build_cmd:
47+
- melos run try_build_ios
48+
- melos run try_build_ios_swift_package_manager
4649
steps:
4750
- uses: actions/checkout@v4
4851
- uses: actions/setup-java@v4
4952
with:
50-
distribution: 'zulu'
51-
java-version: '17'
53+
distribution: "zulu"
54+
java-version: "17"
5255
- uses: subosito/flutter-action@v2
5356
with:
5457
architecture: x64
55-
channel: 'stable'
58+
channel: "stable"
5659
- run: dart --version
5760
- run: flutter --version
5861
- name: Install melos
5962
run: dart pub global activate melos
6063
- name: Melos bootstrap
6164
run: melos bootstrap
6265
- name: Build iOS debug with melos
63-
run: melos run try_build_ios
66+
run: ${{ matrix.build_cmd }}
6467

6568
test_android:
6669
needs: analyze
6770
name: Test Android on ${{ matrix.os }}
6871
runs-on: ${{ matrix.os }}
6972
strategy:
7073
matrix:
71-
os: [ ubuntu-latest ]
74+
os: [ubuntu-latest]
7275
steps:
7376
- uses: actions/checkout@v4
7477
- uses: actions/setup-java@v4
7578
with:
76-
distribution: 'zulu'
77-
java-version: '17'
79+
distribution: "zulu"
80+
java-version: "17"
7881
- uses: subosito/flutter-action@v2
7982
with:
80-
channel: 'stable'
83+
channel: "stable"
8184
- run: dart --version
8285
- run: flutter --version
8386
- run: flutter pub get
@@ -93,16 +96,16 @@ jobs:
9396
runs-on: ${{ matrix.os }}
9497
strategy:
9598
matrix:
96-
os: [ ubuntu-latest ]
99+
os: [ubuntu-latest]
97100
steps:
98101
- uses: actions/checkout@v4
99102
- uses: actions/setup-java@v4
100103
with:
101-
distribution: 'zulu'
102-
java-version: '17'
104+
distribution: "zulu"
105+
java-version: "17"
103106
- uses: subosito/flutter-action@v2
104107
with:
105-
channel: 'stable'
108+
channel: "stable"
106109
- run: dart --version
107110
- run: flutter --version
108111
- name: Install melos

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,8 @@
3939
example/macos/Flutter/ephemeral/flutter_export_environment.sh
4040

4141
pubspec_overrides.yaml
42-
pubspec.lock
42+
pubspec.lock
43+
44+
# FVM Version Cache
45+
.fvm/
46+
.fvmrc

melos.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ scripts:
2323
try_build_ios:
2424
exec: |
2525
set -e
26+
flutter config --no-enable-swift-package-manager
27+
flutter pub get
28+
flutter build ios --debug --no-codesign
29+
packageFilters:
30+
fileExists: lib/main.dart
31+
try_build_ios_swift_package_manager:
32+
exec: |
33+
set -e
34+
flutter config --enable-swift-package-manager
2635
flutter pub get
2736
flutter build ios --debug --no-codesign
2837
packageFilters:

packages/flutter_image_compress/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.buildlog/
99
.history
1010
.svn/
11+
build/
1112

1213
# IntelliJ related
1314
*.iml

packages/flutter_image_compress/example/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,6 @@ build/
7676
*.lock
7777

7878
!pubspec.lock
79+
80+
# FVM Version Cache
81+
.fvm/
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// swift-tools-version: 5.9
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
//
4+
// Generated file. Do not edit.
5+
//
6+
7+
import PackageDescription
8+
9+
let package = Package(
10+
name: "FlutterGeneratedPluginSwiftPackage",
11+
platforms: [
12+
.iOS("12.0")
13+
],
14+
products: [
15+
.library(name: "FlutterGeneratedPluginSwiftPackage", type: .static, targets: ["FlutterGeneratedPluginSwiftPackage"])
16+
],
17+
dependencies: [
18+
.package(name: "path_provider_foundation", path: "/Users/cai/.pub-cache/hosted/pub.flutter-io.cn/path_provider_foundation-2.4.0/darwin/path_provider_foundation")
19+
],
20+
targets: [
21+
.target(
22+
name: "FlutterGeneratedPluginSwiftPackage",
23+
dependencies: [
24+
.product(name: "path-provider-foundation", package: "path_provider_foundation")
25+
]
26+
)
27+
]
28+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//
2+
// Generated file. Do not edit.
3+
//

packages/flutter_image_compress/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
1213
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
1314
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
1415
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
@@ -56,6 +57,7 @@
5657
isa = PBXFrameworksBuildPhase;
5758
buildActionMask = 2147483647;
5859
files = (
60+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
5961
CCE73E2AE7041805F7C0FD33 /* Pods_Runner.framework in Frameworks */,
6062
);
6163
runOnlyForDeploymentPostprocessing = 0;
@@ -155,6 +157,9 @@
155157
dependencies = (
156158
);
157159
name = Runner;
160+
packageProductDependencies = (
161+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
162+
);
158163
productName = Runner;
159164
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
160165
productType = "com.apple.product-type.application";
@@ -184,6 +189,9 @@
184189
Base,
185190
);
186191
mainGroup = 97C146E51CF9000F007C117D;
192+
packageReferences = (
193+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
194+
);
187195
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
188196
projectDirPath = "";
189197
projectRoot = "";
@@ -270,7 +278,6 @@
270278
"${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework",
271279
"${BUILT_PRODUCTS_DIR}/flutter_image_compress_common/flutter_image_compress_common.framework",
272280
"${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework",
273-
"${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework",
274281
);
275282
name = "[CP] Embed Pods Frameworks";
276283
outputPaths = (
@@ -279,7 +286,6 @@
279286
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageWebPCoder.framework",
280287
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_image_compress_common.framework",
281288
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework",
282-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework",
283289
);
284290
runOnlyForDeploymentPostprocessing = 0;
285291
shellPath = /bin/sh;
@@ -497,6 +503,20 @@
497503
defaultConfigurationName = Release;
498504
};
499505
/* End XCConfigurationList section */
506+
507+
/* Begin XCLocalSwiftPackageReference section */
508+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
509+
isa = XCLocalSwiftPackageReference;
510+
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
511+
};
512+
/* End XCLocalSwiftPackageReference section */
513+
514+
/* Begin XCSwiftPackageProductDependency section */
515+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
516+
isa = XCSwiftPackageProductDependency;
517+
productName = FlutterGeneratedPluginSwiftPackage;
518+
};
519+
/* End XCSwiftPackageProductDependency section */
500520
};
501521
rootObject = 97C146E61CF9000F007C117D /* Project object */;
502522
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<PreActions>
9+
<ExecutionAction
10+
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
11+
<ActionContent
12+
title = "Run Prepare Flutter Framework Script"
13+
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
14+
<EnvironmentBuildable>
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
18+
BuildableName = "Runner.app"
19+
BlueprintName = "Runner"
20+
ReferencedContainer = "container:Runner.xcodeproj">
21+
</BuildableReference>
22+
</EnvironmentBuildable>
23+
</ActionContent>
24+
</ExecutionAction>
25+
</PreActions>
826
<BuildActionEntries>
927
<BuildActionEntry
1028
buildForTesting = "YES"
@@ -51,6 +69,7 @@
5169
ignoresPersistentStateOnLaunch = "NO"
5270
debugDocumentVersioning = "YES"
5371
debugServiceExtension = "internal"
72+
enableGPUValidationMode = "1"
5473
allowLocationSimulation = "YES">
5574
<BuildableProductRunnable
5675
runnableDebuggingMode = "0">

0 commit comments

Comments
 (0)