mirror of
https://github.com/immich-app/immich.git
synced 2026-05-21 15:16:31 -04:00
4d1f6f869b
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
133 lines
3.5 KiB
TOML
133 lines
3.5 KiB
TOML
[tasks."codegen:dart"]
|
|
alias = "codegen"
|
|
description = "Execute build_runner to auto-generate dart code"
|
|
sources = [
|
|
"pubspec.yaml",
|
|
"build.yaml",
|
|
"lib/**/*.dart",
|
|
"infrastructure/**/*.drift",
|
|
]
|
|
outputs = { auto = true }
|
|
run = [
|
|
"dart run build_runner build --delete-conflicting-outputs",
|
|
"dart format lib/routing/router.gr.dart",
|
|
]
|
|
|
|
[tasks."codegen:watch"]
|
|
alias = "watch"
|
|
description = "Watch and auto-generate dart code"
|
|
run = "dart run build_runner watch --delete-conflicting-outputs"
|
|
|
|
[tasks."codegen:pigeon"]
|
|
alias = "pigeon"
|
|
description = "Generate pigeon platform code"
|
|
run = [
|
|
"dart run pigeon --input pigeon/native_sync_api.dart",
|
|
"dart run pigeon --input pigeon/local_image_api.dart",
|
|
"dart run pigeon --input pigeon/remote_image_api.dart",
|
|
"dart run pigeon --input pigeon/background_worker_api.dart",
|
|
"dart run pigeon --input pigeon/background_worker_lock_api.dart",
|
|
"dart run pigeon --input pigeon/connectivity_api.dart",
|
|
"dart run pigeon --input pigeon/network_api.dart",
|
|
"dart format lib/platform/native_sync_api.g.dart lib/platform/local_image_api.g.dart lib/platform/remote_image_api.g.dart lib/platform/background_worker_api.g.dart lib/platform/background_worker_lock_api.g.dart lib/platform/connectivity_api.g.dart lib/platform/network_api.g.dart",
|
|
]
|
|
|
|
[tasks."codegen:translation"]
|
|
alias = "translation"
|
|
description = "Generate translations from i18n JSONs"
|
|
run = [
|
|
{ task = "//:i18n:format-fix" },
|
|
{ tasks = [
|
|
"i18n:loader",
|
|
"i18n:keys",
|
|
] },
|
|
]
|
|
|
|
[tasks."codegen:app-icon"]
|
|
description = "Generate app icons"
|
|
run = "flutter pub run flutter_launcher_icons:main"
|
|
|
|
[tasks."codegen:splash"]
|
|
description = "Generate splash screen"
|
|
run = "flutter pub run flutter_native_splash:create"
|
|
|
|
[tasks.test]
|
|
description = "Run mobile tests"
|
|
run = "flutter test"
|
|
|
|
[tasks.analyze]
|
|
alias = "lint"
|
|
description = "Analyze Dart code"
|
|
depends = ["analyze:dart", "analyze:dcm"]
|
|
|
|
[tasks."analyze-fix"]
|
|
alias = "lint-fix"
|
|
description = "Auto-fix Dart code"
|
|
depends = ["analyze-fix:dart", "analyze-fix:dcm"]
|
|
|
|
[tasks.format]
|
|
description = "Format Dart code"
|
|
run = "dart format --set-exit-if-changed $(find lib -name '*.dart' -not \\( -name '*.g.dart' -o -name '*.drift.dart' -o -name '*.gr.dart' \\))"
|
|
|
|
[tasks."build:android"]
|
|
description = "Build Android release"
|
|
run = "flutter build appbundle"
|
|
|
|
[tasks."drift:migration"]
|
|
alias = "migration"
|
|
description = "Generate database migrations"
|
|
run = "dart run drift_dev make-migrations"
|
|
|
|
|
|
# Internal tasks
|
|
[tasks."i18n:loader"]
|
|
description = "Generate i18n loader"
|
|
hide = true
|
|
sources = ["i18n/"]
|
|
outputs = "lib/generated/codegen_loader.g.dart"
|
|
run = [
|
|
"dart run easy_localization:generate -S ../i18n",
|
|
"dart format lib/generated/codegen_loader.g.dart",
|
|
]
|
|
|
|
[tasks."i18n:keys"]
|
|
description = "Generate i18n keys"
|
|
hide = true
|
|
sources = ["i18n/en.json"]
|
|
outputs = "lib/generated/translations.g.dart"
|
|
run = [
|
|
"dart run bin/generate_keys.dart",
|
|
"dart format lib/generated/translations.g.dart",
|
|
]
|
|
|
|
[tasks."analyze:dart"]
|
|
description = "Run Dart analysis"
|
|
hide = true
|
|
run = "dart analyze --fatal-infos"
|
|
|
|
[tasks."analyze:dcm"]
|
|
description = "Run Dart Code Metrics"
|
|
hide = true
|
|
run = "dcm analyze lib --fatal-style --fatal-warnings"
|
|
|
|
[tasks."analyze-fix:dart"]
|
|
description = "Auto-fix Dart analysis"
|
|
hide = true
|
|
run = "dart fix --apply"
|
|
|
|
[tasks."analyze-fix:dcm"]
|
|
description = "Auto-fix Dart Code Metrics"
|
|
hide = true
|
|
run = "dcm fix lib"
|
|
|
|
|
|
[tasks.checklist]
|
|
run = [
|
|
{task = "codegen:pigeon" },
|
|
{task = "codegen:dart" },
|
|
{task = "codegen:translation" },
|
|
{task = "analyze" },
|
|
{task = "format" },
|
|
{task = "test" },
|
|
]
|