diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3aa2df47..20c92d28 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 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..a0828f77 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_Release_Candidate" + 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 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 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/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 { 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 } 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 +} 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!(); }