diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index c79fb7ed45..b5b6ee8d39 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -27,7 +27,7 @@ jobs: build: name: '${{ matrix.target }} | ${{ matrix.os }} | ${{ matrix.sdk }}' - runs-on: ${{ matrix.os }}-latest + runs-on: ${{ matrix.os == 'macos' && 'macos-15' || matrix.os == 'ubuntu' && 'ubuntu-latest' || matrix.os == 'windows' && 'windows-latest' }} timeout-minutes: 30 strategy: fail-fast: false @@ -71,6 +71,11 @@ jobs: coverage: sentry_flutter min-coverage: 90 + # QuickFix for failing iOS 18.0 builds https://github.com/actions/runner-images/issues/12758#issuecomment-3187115656 + - name: Switch to Xcode 16.4 for iOS 18.5 + if: matrix.os == 'macos' + run: sudo xcode-select --switch /Applications/Xcode_16.4.app + - name: Build example for ${{ matrix.target }} # The example currently doesn't support compiling for WASM. Should be OK once we add package:web in v9. if: matrix.target != 'wasm' @@ -125,6 +130,10 @@ jobs: - run: flutter config --enable-swift-package-manager + # QuickFix for failing iOS 18.0 builds https://github.com/actions/runner-images/issues/12758#issuecomment-3187115656 + - name: Switch to Xcode 16.4 for iOS 18.5 + run: sudo xcode-select --switch /Applications/Xcode_16.4.app + - name: Run on iOS if: matrix.target == 'ios' run: flutter build ios --no-codesign @@ -141,7 +150,7 @@ jobs: panaThreshold: 87 pod-lint: - runs-on: macos-latest + runs-on: macos-15 timeout-minutes: 20 defaults: run: @@ -149,6 +158,11 @@ jobs: steps: - uses: actions/checkout@v4 # https://github.com/CocoaPods/CocoaPods/issues/5275#issuecomment-315461879 + + # QuickFix for failing iOS 18.0 builds https://github.com/actions/runner-images/issues/12758#issuecomment-3187115656 + - name: Switch to Xcode 16.4 for iOS 18.5 + run: sudo xcode-select --switch /Applications/Xcode_16.4.app + - run: pod lib lint ios/sentry_flutter.podspec --configuration=Debug --skip-import-validation --allow-warnings --verbose swift-lint: diff --git a/.github/workflows/flutter_test.yml b/.github/workflows/flutter_test.yml index 1b0253a844..2fbffcee9c 100644 --- a/.github/workflows/flutter_test.yml +++ b/.github/workflows/flutter_test.yml @@ -105,7 +105,7 @@ jobs: cocoa: name: '${{ matrix.target }} | ${{ matrix.sdk }}' - runs-on: macos-latest-xlarge + runs-on: macos-15-xlarge timeout-minutes: 30 defaults: run: @@ -129,12 +129,16 @@ jobs: - run: pod install working-directory: packages/flutter/example/${{ matrix.target }} + # QuickFix for failing iOS 18.0 builds https://github.com/actions/runner-images/issues/12758#issuecomment-3187115656 + - name: Switch to Xcode 16.4 for iOS 18.5 + run: sudo xcode-select --switch /Applications/Xcode_16.4.app + - name: prepare test device id: device run: | case "${{ matrix.target }}" in ios) - device=$(xcrun simctl create sentryPhone com.apple.CoreSimulator.SimDeviceType.iPhone-16 com.apple.CoreSimulator.SimRuntime.iOS-18-0) + device=$(xcrun simctl create sentryPhone com.apple.CoreSimulator.SimDeviceType.iPhone-16 com.apple.CoreSimulator.SimRuntime.iOS-18-5) xcrun simctl boot ${device} echo "platform=iOS Simulator,id=${device}" >> "$GITHUB_OUTPUT" ;; diff --git a/.github/workflows/metrics.yml b/.github/workflows/metrics.yml index 0ae30c2679..c1f6e2cc41 100644 --- a/.github/workflows/metrics.yml +++ b/.github/workflows/metrics.yml @@ -34,7 +34,7 @@ jobs: - platform: ios name: iOS appPlain: test-app-plain.ipa - host: macos-latest + host: macos-15 - platform: android name: Android appPlain: metrics/perf-test-app-plain/build/app/outputs/apk/release/app-arm64-v8a-release.apk @@ -71,6 +71,11 @@ jobs: path: ${{ matrix.appPlain }} key: ${{ github.workflow }}-${{ github.job }}-appplain-${{ matrix.platform }}-${{ hashFiles('metrics/perf-test-app-plain/pubspec.yaml') }} + # QuickFix for failing iOS 18.0 builds https://github.com/actions/runner-images/issues/12758#issuecomment-3187115656 + - name: Switch to Xcode 16.4 + if: ${{ matrix.host == 'macos-15' }} + run: sudo xcode-select --switch /Applications/Xcode_16.4.app + - name: Build run: ./metrics/build.sh ${{ matrix.platform }} env: diff --git a/.github/workflows/min_version_test.yml b/.github/workflows/min_version_test.yml index ebcf2f6235..30007a7366 100644 --- a/.github/workflows/min_version_test.yml +++ b/.github/workflows/min_version_test.yml @@ -45,7 +45,7 @@ jobs: flutter build appbundle build-ios: - runs-on: macos-latest + runs-on: macos-15 timeout-minutes: 30 steps: @@ -65,6 +65,10 @@ jobs: sudo gem install cocoapods echo "$(which pod)" + # QuickFix for failing iOS 18.0 builds https://github.com/actions/runner-images/issues/12758#issuecomment-3187115656 + - name: Switch to Xcode 16.4 for iOS 18.5 + run: sudo xcode-select --switch /Applications/Xcode_16.4.app + - name: Build iOS run: | cd min_version_test diff --git a/packages/flutter/example/ios/Podfile b/packages/flutter/example/ios/Podfile index 8cb4ddb285..4a126a74a2 100644 --- a/packages/flutter/example/ios/Podfile +++ b/packages/flutter/example/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' @@ -44,7 +44,7 @@ post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' end end end diff --git a/packages/flutter/example/ios/Runner.xcodeproj/project.pbxproj b/packages/flutter/example/ios/Runner.xcodeproj/project.pbxproj index 11cb23fc9d..0b00834362 100644 --- a/packages/flutter/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/flutter/example/ios/Runner.xcodeproj/project.pbxproj @@ -462,7 +462,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -485,7 +485,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -634,7 +634,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -684,7 +684,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -709,7 +709,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -742,7 +742,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/packages/flutter/example/macos/Podfile b/packages/flutter/example/macos/Podfile index 6feac427ca..04ed3562bb 100644 --- a/packages/flutter/example/macos/Podfile +++ b/packages/flutter/example/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.14' +platform :osx, '10.15' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -37,7 +37,7 @@ post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_macos_build_settings(target) target.build_configurations.each do |config| - config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.14' + config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.15' end end end diff --git a/packages/flutter/lib/src/screenshot/screenshot.dart b/packages/flutter/lib/src/screenshot/screenshot.dart index 5bcda32e87..b0bf970132 100644 --- a/packages/flutter/lib/src/screenshot/screenshot.dart +++ b/packages/flutter/lib/src/screenshot/screenshot.dart @@ -1,9 +1,10 @@ import 'dart:async'; import 'dart:developer'; import 'dart:ui'; +// ignore: unnecessary_import +import 'package:meta/meta.dart'; import 'package:flutter/foundation.dart'; -import 'package:meta/meta.dart'; @internal class Screenshot { diff --git a/packages/flutter/lib/src/sentry_asset_bundle.dart b/packages/flutter/lib/src/sentry_asset_bundle.dart index 48aba614dc..ea24cdfad2 100644 --- a/packages/flutter/lib/src/sentry_asset_bundle.dart +++ b/packages/flutter/lib/src/sentry_asset_bundle.dart @@ -5,10 +5,12 @@ import 'dart:typed_data'; // ignore: unnecessary_import import 'dart:ui'; +// ignore: unnecessary_import +import 'package:meta/meta.dart'; + import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:flutter/material.dart'; -import 'package:meta/meta.dart'; import 'package:sentry/sentry.dart'; /// An [AssetBundle] which creates automatic performance traces for loading diff --git a/packages/flutter/lib/src/utils/timer_debouncer.dart b/packages/flutter/lib/src/utils/timer_debouncer.dart index bd953ef0a8..4f51002b67 100644 --- a/packages/flutter/lib/src/utils/timer_debouncer.dart +++ b/packages/flutter/lib/src/utils/timer_debouncer.dart @@ -1,7 +1,9 @@ import 'dart:async'; -import 'package:flutter/foundation.dart'; +// ignore: unnecessary_import import 'package:meta/meta.dart'; +import 'package:flutter/foundation.dart'; + @internal class TimerDebouncer { final int milliseconds; diff --git a/packages/hive/lib/src/sentry_box_base.dart b/packages/hive/lib/src/sentry_box_base.dart index 6623fed5ad..df08118335 100644 --- a/packages/hive/lib/src/sentry_box_base.dart +++ b/packages/hive/lib/src/sentry_box_base.dart @@ -16,7 +16,7 @@ class SentryBoxBase implements BoxBase { /// @nodoc SentryBoxBase(this._boxBase, this._hub) { - _spanHelper.setHub(this._hub); + _spanHelper.setHub(_hub); } @override