From 1c6f047f0126a6e4ae3acd247e1f111e97ec2a04 Mon Sep 17 00:00:00 2001 From: Seungbin Oh Date: Sat, 14 Sep 2024 12:12:21 +0900 Subject: [PATCH 1/6] chore: fix build on xcode 16 --- ios/Podfile | 2 +- ios/Podfile.lock | 2 +- ios/Runner.xcodeproj/project.pbxproj | 3 +++ .../xcshareddata/swiftpm/Package.resolved | 15 +++++++++++++++ .../xcshareddata/swiftpm/Package.resolved | 15 +++++++++++++++ 5 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/ios/Podfile b/ios/Podfile index cbbb6475..aafcc012 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '12.0' +platform :ios, '13.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 8cf74493..53d8ac5c 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -283,6 +283,6 @@ SPEC CHECKSUMS: webview_cookie_manager: eaf920722b493bd0f7611b5484771ca53fed03f7 webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f -PODFILE CHECKSUM: e449250f1b94b4fe503fafa456eb8bfadb338998 +PODFILE CHECKSUM: b34ba01b6d31eabe4d020b5ccb7ac5cba06d49cf COCOAPODS: 1.15.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c2db953b..04ea36d0 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -732,6 +732,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-iOS"; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; @@ -1114,6 +1115,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-iOS"; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; @@ -1154,6 +1156,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-iOS"; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..9efcafa6 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "e8f130fe30ac6cdc940ef06ee1e8535e9f46ffee6aeead1722b9525562f6ce08", + "pins" : [ + { + "identity" : "alamofire", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Alamofire/Alamofire.git", + "state" : { + "revision" : "bc268c28fb170f494de9e9927c371b8342979ece", + "version" : "5.7.1" + } + } + ], + "version" : 3 +} diff --git a/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..9efcafa6 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "e8f130fe30ac6cdc940ef06ee1e8535e9f46ffee6aeead1722b9525562f6ce08", + "pins" : [ + { + "identity" : "alamofire", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Alamofire/Alamofire.git", + "state" : { + "revision" : "bc268c28fb170f494de9e9927c371b8342979ece", + "version" : "5.7.1" + } + } + ], + "version" : 3 +} From ed57d88601700915ce3c5e1ea881374c5fe9d304 Mon Sep 17 00:00:00 2001 From: Seungbin Oh Date: Sat, 14 Sep 2024 12:50:30 +0900 Subject: [PATCH 2/6] chore: update github actions FLUTTER_VERSION: 3.22.3 > 3.24.0 macos runner: 13 > 14-arm64 XCODE_VERSION: 15.0 > 16 Beta 6 IOS_DEVICE: iPhone 14 Pro > 15 Pro ANDROID_API_LEVEL: 28 > 34 --- .github/workflows/build.yml | 17 ++++++++--------- .github/workflows/coverage.yml | 7 +++---- .github/workflows/lint.yml | 5 ++--- .github/workflows/test.yml | 30 +++++++++++++++++++----------- 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3aa2df47..b8ed173b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,17 +7,18 @@ on: branches: [main] env: - FLUTTER_VERSION: "3.22.3" + FLUTTER_VERSION: "3.24.0" JAVA_VERSION: "17" + XCODE_VERSION: "Xcode_16_beta_6" jobs: build-android: name: Build Android runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "adopt" java-version: ${{ env.JAVA_VERSION }} @@ -25,7 +26,6 @@ jobs: uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} - # channel: "stable" - name: Create key.properties run: | echo "storeFile=../ci.jks" > android/key.properties @@ -39,17 +39,16 @@ jobs: build-ios: name: Build iOS - runs-on: macos-13 + runs-on: macos-14-arm64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Select Xcode version - run: sudo xcode-select -s '/Applications/Xcode_15.0.app/Contents/Developer' + run: sudo xcode-select -s '/Applications/${{ env.XCODE_VERSION }}.app/Contents/Developer' - name: Set up Flutter uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} - # channel: "stable" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: Pods key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ecaf9ed3..4af734aa 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -3,19 +3,18 @@ name: Coverage on: [push] env: - FLUTTER_VERSION: "3.22.3" + FLUTTER_VERSION: "3.24.0" jobs: coverage: name: Upload coverage to Codecov runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Flutter uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} - # channel: "stable" - name: Install lcov run: sudo apt-get install -y lcov - name: Install dependencies @@ -23,7 +22,7 @@ jobs: - name: Test run: ./test/run.sh - name: Upload - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./coverage/lcov.info token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c623fbb9..2d7049e2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,19 +7,18 @@ on: branches: [main] env: - FLUTTER_VERSION: "3.22.3" + FLUTTER_VERSION: "3.24.0" jobs: lint: name: Format and Analyze runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Flutter uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} - # channel: "stable" - name: Install dependencies run: flutter pub get - name: Format diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 92e862bc..05f5a20d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,15 +5,18 @@ on: branches: [main] env: - FLUTTER_VERSION: "3" + FLUTTER_VERSION: "3.24.0" JAVA_VERSION: "17" + ANDROID_API_LEVEL: "34" + XCODE_VERSION: "Xcode_16_beta_6" + IOS_DEVICE: "iPhone 15 Pro" jobs: unit: name: Unit & Widget Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Flutter uses: subosito/flutter-action@v2 with: @@ -26,11 +29,11 @@ jobs: integration-android: name: Integration Test on Android - runs-on: macos-latest + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "adopt" java-version: ${{ env.JAVA_VERSION }} @@ -39,32 +42,37 @@ jobs: with: flutter-version: ${{ env.FLUTTER_VERSION }} channel: "stable" + - name: Enable KVM group perms + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm - name: Test on Android uses: reactivecircus/android-emulator-runner@v2 with: - api-level: 28 + api-level: ${{ env.ANDROID_API_LEVEL }} script: flutter drive -d emulator-5554 --target=test_driver/app.dart integration-ios: name: Integration Test on iOS - runs-on: macos-13 + runs-on: macos-14-arm64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Select Xcode version - run: sudo xcode-select -s '/Applications/Xcode_15.0.app/Contents/Developer' + run: sudo xcode-select -s '/Applications/${{ env.XCODE_VERSION }}.app/Contents/Developer' - name: Set up Flutter uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} channel: "stable" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: Pods key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} restore-keys: | ${{ runner.os }}-pods- - name: List Simulator - run: echo "UDID=$(xcrun xctrace list devices 2>&1 | awk '/iPhone 14 Pro/ {print $NF; exit}' | tr -d '()')" >> $GITHUB_ENV + run: echo "UDID=$(xcrun xctrace list devices 2>&1 | awk '/${{ env.IOS_DEVICE }}/ {print $NF; exit}' | tr -d '()')" >> $GITHUB_ENV - name: Start Simulator run: xcrun simctl boot ${{ env.UDID }} - name: Test on iOS From cde0e938e8d49d86a366f9ff81c2ae5e2c42c4be Mon Sep 17 00:00:00 2001 From: Seungbin Oh Date: Sat, 14 Sep 2024 13:08:57 +0900 Subject: [PATCH 3/6] chore: update android deps version --- android/app/build.gradle.kts | 2 +- android/gradle/wrapper/gradle-wrapper.properties | 2 +- android/settings.gradle.kts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index cc67901f..71677bbf 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -88,6 +88,6 @@ flutter { dependencies { testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test:runner:1.6.1") + androidTestImplementation("androidx.test:runner:1.6.2") androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1") } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 71feb9cf..b4982738 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sat Jan 01 21:36:37 KST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index 3547fac6..0e03ade7 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -19,7 +19,7 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" - id("com.android.application") version "8.3.0" apply false + id("com.android.application") version "8.5.2" apply false id("org.jetbrains.kotlin.android") version "1.9.23" apply false } From 048fafdad737c8d5591114cefe82eef4400e292d Mon Sep 17 00:00:00 2001 From: Seungbin Oh Date: Sat, 14 Sep 2024 13:20:00 +0900 Subject: [PATCH 4/6] chore: change to onPopInvokedWithResult --- lib/widgets/lecture_search.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/lecture_search.dart b/lib/widgets/lecture_search.dart index 25e9791e..71a2f4e3 100644 --- a/lib/widgets/lecture_search.dart +++ b/lib/widgets/lecture_search.dart @@ -27,7 +27,7 @@ class _LectureSearchState extends State { final searchModel = context.watch(); return PopScope( - onPopInvoked: (_) { + onPopInvokedWithResult: (_, __) { if (widget.onClosed != null) { widget.onClosed!(); } From 3cf4151edbde2947bd2404a2bcbf5dedbe0c7310 Mon Sep 17 00:00:00 2001 From: Seungbin Oh Date: Sat, 14 Sep 2024 13:21:18 +0900 Subject: [PATCH 5/6] chore: macos-14-arm64 to macos-14 --- .github/workflows/build.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8ed173b..20c92d28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: build-ios: name: Build iOS - runs-on: macos-14-arm64 + runs-on: macos-14 steps: - uses: actions/checkout@v4 - name: Select Xcode version diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05f5a20d..bf586ab9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,7 +55,7 @@ jobs: integration-ios: name: Integration Test on iOS - runs-on: macos-14-arm64 + runs-on: macos-14 steps: - uses: actions/checkout@v4 - name: Select Xcode version From 3be62c654cb2805d97d78ad0f5520f23ee2c93c6 Mon Sep 17 00:00:00 2001 From: Seungbin Oh Date: Sat, 14 Sep 2024 17:03:10 +0900 Subject: [PATCH 6/6] chore: fix github actions ios build chore: fix android build script --- .github/workflows/test.yml | 2 +- android/build.gradle.kts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bf586ab9..a0828f77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ env: FLUTTER_VERSION: "3.24.0" JAVA_VERSION: "17" ANDROID_API_LEVEL: "34" - XCODE_VERSION: "Xcode_16_beta_6" + XCODE_VERSION: "Xcode_16_Release_Candidate" IOS_DEVICE: "iPhone 15 Pro" jobs: diff --git a/android/build.gradle.kts b/android/build.gradle.kts index b9808124..09506e99 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -37,6 +37,13 @@ subprojects { } } } + if (project.plugins.hasPlugin("com.android.application") || + project.plugins.hasPlugin("com.android.library") + ) { + project.extensions.configure { + rootProject.extra.get("compileSdkVersion")?.toString()?.toIntOrNull()?.let { compileSdkVersion(it) } + } + } tasks.withType(KotlinCompile::class.java).configureEach { if (project.plugins.hasPlugin("com.android.application") || project.plugins.hasPlugin("com.android.library")) { kotlinOptions {