Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on Xcode 16, update GitHub Actions scripts #198

Merged
merged 6 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ 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 }}
- name: Set up Flutter
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
Expand All @@ -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') }}
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,26 @@ 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
run: flutter pub get
- 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 }}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 19 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
7 changes: 7 additions & 0 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ subprojects {
}
}
}
if (project.plugins.hasPlugin("com.android.application") ||
project.plugins.hasPlugin("com.android.library")
) {
project.extensions.configure<BaseExtension> {
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 {
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,6 @@ SPEC CHECKSUMS:
webview_cookie_manager: eaf920722b493bd0f7611b5484771ca53fed03f7
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f

PODFILE CHECKSUM: e449250f1b94b4fe503fafa456eb8bfadb338998
PODFILE CHECKSUM: b34ba01b6d31eabe4d020b5ccb7ac5cba06d49cf

COCOAPODS: 1.15.2
3 changes: 3 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
15 changes: 15 additions & 0 deletions ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion lib/widgets/lecture_search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
final searchModel = context.watch<LectureSearchModel>();

return PopScope(
onPopInvoked: (_) {
onPopInvokedWithResult: (_, __) {

Check warning on line 30 in lib/widgets/lecture_search.dart

View check run for this annotation

Codecov / codecov/patch

lib/widgets/lecture_search.dart#L30

Added line #L30 was not covered by tests
if (widget.onClosed != null) {
widget.onClosed!();
}
Expand Down
Loading