name: smplayer
description: SM Emby - Emby 媒体服务器客户端
publish_to: "none"
version: 0.2.7

environment:
  sdk: ^3.12.0
  flutter: ">=3.44.0"

dependencies:
  flutter:
    sdk: flutter

  # 本地化（GlobalMaterial/Cupertino/Widgets 本地化 + zh-CN locale，
  # 用于让 CJK 文本按简体中文选择字形并提供中文 Material 文案）
  flutter_localizations:
    sdk: flutter

  # 状态管理
  flutter_riverpod: ^3.3.2

  # 路由
  go_router: ^17.3.0

  # HTTP
  dio: ^5.7.0

  # Primary video engine: fvp (libmdk) standalone, via package:fvp/mdk.dart.
  # libmdk is pinned to v0.37.0 on Windows and Android: Windows via
  # scripts/prepare-fvp-windows-deps.ps1, Android via FVP_DEPS_URL
  # (dev-android scripts + release-android.yml). macOS remains governed by
  # fvp's CocoaPods `mdk` constraint. Do NOT use FVP_DEPS_LATEST nightly.
  fvp: 0.37.3

  # Secondary video engine: media_kit (mpv/libmpv).
  # Coexists with fvp on macOS: both are dynamic xcframeworks with different
  # install names and different FFmpeg major versions (mdk→libavcodec.62 weak,
  # mpv→Avcodec@60), so they do not collide at link or runtime.
  media_kit: ^1.2.6
  media_kit_video: ^2.0.1
  media_kit_libs_video: ^1.0.7

  # Tertiary video engine (Android only): Media3 ExoPlayer + FFmpeg audio decoder.
  # 仅 Android 注册；本地 path 依赖，不发布 pub。AAR (media3-decoder-ffmpeg
  # arm64-v8a) 由 scripts/build_media3_ffmpeg.sh 生成，放在 android/app/libs/。
  media3_engine:
    path: plugins/media3_engine

  # 图片缓存
  cached_network_image: ^3.4.1

  # 本地存储
  shared_preferences: ^2.3.4
  path_provider: ^2.1.5
  package_info_plus: ^10.1.0
  file_selector: ^1.0.3

  # 深链 / 外部浏览器（Trakt OAuth 账号链接）
  app_links: ^7.2.0
  url_launcher: ^6.3.1

  # 加密（SHA-256 校验）
  crypto: ^3.0.0

  # 工具
  uuid: ^4.5.1

  # Codegen 注解（运行时）
  freezed_annotation: ^3.1.0
  json_annotation: ^4.12.0

  # 桌面窗口管理
  window_manager: ^0.5.2
  screen_retriever: ^0.2.2
  canvas_danmaku: ^0.3.1
  wakelock_plus: ^1.2.8
  screen_brightness: ^2.1.11
  forui: ^0.23.0
  reorderable_grid: ^1.0.13
  # 脚本组件 JS 引擎（QuickJS via Rust，全平台统一；替代 flutter_js——
  # 其 macOS/iOS JSC 路径同步跑在主 isolate 上，失控脚本会带崩整个进程）
  fjs: ^3.2.0

flutter_launcher_icons:
  image_path: "assets/icon/app_icon.png"
  macos:
    generate: true
    image_path: "assets/icon/app_icon.png"
  windows:
    generate: true
    image_path: "assets/icon/app_icon.png"

dependency_overrides:
  # Windows: vendor fork with a full libmpv build (upstream 1.0.11 ships a
  # stripped FFmpeg missing truehd audio + hdmv_pgs_subtitle bitmap decoders,
  # media-kit/media-kit#1269 / #1371). See plugins/media_kit_libs_windows_video/
  # README.md for the rationale and follow-ups.
  media_kit_libs_windows_video:
    path: plugins/media_kit_libs_windows_video

dev_dependencies:
  flutter_launcher_icons: ^0.14.3
  flutter_lints: ^6.0.0

  # 单元测试
  flutter_test:
    sdk: flutter
  fake_async: ^1.3.2
  # 仅测试用：ExternalLibrary（为 flutter test 显式加载 libfjs 动态库）
  flutter_rust_bridge: ^2.12.0

  # Codegen 工具链
  build_runner: ^2.4.13
  freezed: ^3.2.3
  json_serializable: ^6.14.0

flutter:
  uses-material-design: true

  # fjs 的 SwiftPM 集成依赖包内 fjs.xcframework 的符号链接结构，而 pub.dev
  # 发布会把符号链接压平（Versions/Current 变成真实目录），Xcode 处理该
  # framework 时报 "Couldn't resolve framework symlink"。关闭本项目的 SwiftPM
  # 集成，让 fjs 走 CocoaPods（darwin/fjs.podspec → cargokit，见根目录
  # cargokit_options.yaml 的预编译产物配置）；其余插件本就经 Podfile 构建。
  config:
    enable-swift-package-manager: false

  assets:
    - assets/icon/app_icon.png
    - assets/js/cheerio.min.js

  fonts:
    # 简体中文字体（variable，单文件覆盖全部字重）。仅作为 Latin 主字体
    # （Segoe UI / GeistSans）的 fontFamilyFallback，使中文渲染为简体字形，
    # 不改变英文/数字的既有观感，并保证跨平台（Windows/macOS）一致。
    - family: Noto Sans SC
      fonts:
        - asset: assets/fonts/NotoSansSC.ttf
