diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9cfe71a..bdb1c7c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,5 @@ -name: Flutter CI +name: Dart CI + on: push: branches: @@ -8,30 +9,37 @@ on: - main env: - flutter_version: "3.7.x" + dart_version: "3.4.2" java_version: "12.x" jobs: - flutter_test: + dart_test: runs-on: ubuntu-latest timeout-minutes: 5 + steps: - - uses: actions/checkout@v1 - - uses: actions/setup-java@v1 - with: - java-version: ${{ env.java_version }} - - name: Cache Flutter dependencies - uses: actions/cache@v1 + - uses: actions/checkout@v3 + + - uses: dart-lang/setup-dart@v1 with: - path: /opt/hostedtoolcache/flutter - key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }} - - uses: subosito/flutter-action@v1 + sdk: ${{ env.dart_version }} + + - name: Cache Dart dependencies + uses: actions/cache@v3 with: - flutter-version: ${{ env.flutter_version }} + path: ~/.pub-cache + key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.lock') }} + restore-keys: | + ${{ runner.os }}-dart- + - name: Install dependencies - run: flutter pub get - - name: Run Formatter - run: flutter format --dry-run . --set-exit-if-changed - - name: Run Linter - run: flutter analyze + run: dart pub get + + - name: Check formatting + run: dart format --output=none --set-exit-if-changed . + + - name: Analyze code + run: dart analyze --fatal-infos + - name: Run tests + run: dart test \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml index 1be2c2a..eedf174 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:flutter_lints/flutter.yaml +include: package:lints/recommended.yaml analyzer: errors: diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 9625e10..7c56964 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/example/ios/Podfile b/example/ios/Podfile index 88359b2..279576f 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 2509722..92d336a 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -43,12 +43,13 @@ PODS: - SwiftyGif (5.4.4) - video_player_avfoundation (0.0.1): - Flutter + - FlutterMacOS DEPENDENCIES: - file_picker (from `.symlinks/plugins/file_picker/ios`) - Flutter (from `Flutter`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`) + - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`) SPEC REPOS: trunk: @@ -65,18 +66,18 @@ EXTERNAL SOURCES: path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" video_player_avfoundation: - :path: ".symlinks/plugins/video_player_avfoundation/ios" + :path: ".symlinks/plugins/video_player_avfoundation/darwin" SPEC CHECKSUMS: DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 file_picker: ce3938a0df3cc1ef404671531facef740d03f920 - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 SDWebImage: fd7e1a22f00303e058058278639bf6196ee431fe SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f - video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126 + video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3 -PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 +PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011 -COCOAPODS: 1.12.1 +COCOAPODS: 1.16.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index e13663d..847a0fd 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -156,7 +156,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -343,7 +343,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -420,7 +420,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -469,7 +469,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index a6b826d..5e31d3d 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ =2.12.0 <4.0.0' dependencies: - path_provider: ^2.0.13 xml: ^6.2.2 dev_dependencies: diff --git a/test/motion_photos_test.dart b/test/motion_photos_test.dart index e75b5b0..26102f5 100644 --- a/test/motion_photos_test.dart +++ b/test/motion_photos_test.dart @@ -1,7 +1,7 @@ -import 'package:test/test.dart'; import 'package:motion_photos/motion_photos.dart'; import 'package:motion_photos/src/boyermoore_search.dart'; import 'package:motion_photos/src/constants.dart'; +import 'package:test/test.dart'; void main() { group('isMotionPhoto', () {