Skip to content

Commit

Permalink
chore: update project configuration and dependencies
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
CaiJingLong committed Dec 4, 2024
1 parent 4c1d535 commit b6a32e6
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 23 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/runnable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
distribution: "zulu"
java-version: "17"
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
channel: "stable"
- name: Log Dart/Flutter versions
run: |
dart --version
Expand All @@ -42,42 +42,45 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest ]
os: [macos-latest]
build_cmd:
- melos run try_build_ios
- melos run try_build_ios_swift_package_manager
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
distribution: "zulu"
java-version: "17"
- uses: subosito/flutter-action@v2
with:
architecture: x64
channel: 'stable'
channel: "stable"
- run: dart --version
- run: flutter --version
- name: Install melos
run: dart pub global activate melos
- name: Melos bootstrap
run: melos bootstrap
- name: Build iOS debug with melos
run: melos run try_build_ios
run: ${{ matrix.build_cmd }}

test_android:
needs: analyze
name: Test Android on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
distribution: "zulu"
java-version: "17"
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
channel: "stable"
- run: dart --version
- run: flutter --version
- run: flutter pub get
Expand All @@ -93,16 +96,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
distribution: "zulu"
java-version: "17"
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
channel: "stable"
- run: dart --version
- run: flutter --version
- name: Install melos
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@
example/macos/Flutter/ephemeral/flutter_export_environment.sh

pubspec_overrides.yaml
pubspec.lock
pubspec.lock

# FVM Version Cache
.fvm/
.fvmrc
9 changes: 9 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ scripts:
try_build_ios:
exec: |
set -e
flutter config --no-enable-swift-package-manager
flutter pub get
flutter build ios --debug --no-codesign
packageFilters:
fileExists: lib/main.dart
try_build_ios_swift_package_manager:
exec: |
set -e
flutter config --enable-swift-package-manager
flutter pub get
flutter build ios --debug --no-codesign
packageFilters:
Expand Down
1 change: 1 addition & 0 deletions packages/flutter_image_compress/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.buildlog/
.history
.svn/
build/

# IntelliJ related
*.iml
Expand Down
3 changes: 3 additions & 0 deletions packages/flutter_image_compress/example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ build/
*.lock

!pubspec.lock

# FVM Version Cache
.fvm/
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
//
// Generated file. Do not edit.
//

import PackageDescription

let package = Package(
name: "FlutterGeneratedPluginSwiftPackage",
platforms: [
.iOS("12.0")
],
products: [
.library(name: "FlutterGeneratedPluginSwiftPackage", type: .static, targets: ["FlutterGeneratedPluginSwiftPackage"])
],
dependencies: [
.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")
],
targets: [
.target(
name: "FlutterGeneratedPluginSwiftPackage",
dependencies: [
.product(name: "path-provider-foundation", package: "path_provider_foundation")
]
)
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//
// Generated file. Do not edit.
//
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
Expand Down Expand Up @@ -56,6 +57,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
CCE73E2AE7041805F7C0FD33 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -155,6 +157,9 @@
dependencies = (
);
name = Runner;
packageProductDependencies = (
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
);
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
Expand Down Expand Up @@ -184,6 +189,9 @@
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
packageReferences = (
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
);
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -270,7 +278,6 @@
"${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework",
"${BUILT_PRODUCTS_DIR}/flutter_image_compress_common/flutter_image_compress_common.framework",
"${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
Expand All @@ -279,7 +286,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageWebPCoder.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_image_compress_common.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -497,6 +503,20 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
isa = XCSwiftPackageProductDependency;
productName = FlutterGeneratedPluginSwiftPackage;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Prepare Flutter Framework Script"
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand Down Expand Up @@ -51,6 +69,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
6 changes: 3 additions & 3 deletions packages/flutter_image_compress/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.18.0"
version: "1.19.0"
cross_file:
dependency: transitive
description:
Expand Down Expand Up @@ -194,7 +194,7 @@ packages:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
vector_math:
dependency: transitive
description:
Expand Down

0 comments on commit b6a32e6

Please sign in to comment.