diet-guard/app/pubspec.yaml
Krzysztof kuhy Rudnicki c7538f691b Enforce the shared 250-line file cap
Replace this repo's stale file-length hook with the shared gate every other
repo will use. The old hook capped at 500 lines, called a repo-local
scripts/check_file_length.py, and filtered to types_or: [python, shell] --
so it never looked at the Flutter app in app/ or at any prose. Two caps that
disagree is worse than one, so the old one is deleted rather than kept.

The new hook checks only the files in the commit and exits 1; CI runs --all
as the backstop, since a fresh clone that never ran `pre-commit install` has
no hooks at all. The exemption list lives with the checker in
~/utils/file_length/config.py so the gate and the cross-repo survey cannot
disagree about what "too long" means.

Two things this repo has that ~/todo (the reference implementation) did not:

- A pre-commit CI job running --all-files, where $HOME/utils does not exist.
  The shared gate is checked out to .utils and reached via UTILS_ROOT, or the
  hook fails on a missing checker rather than on anything in this repo.

- Tests that isolate live user state with dotted-string patches
  (`patch("diet_guard._state.FOOD_LOG_FILE", ...)`). unittest.mock.patch fails
  OPEN: once a refactor moves a name, the old path still imports, the patch
  redirects nothing, the test still passes -- and the suite writes to the real
  ~/.local/share/diet_guard, which diet-guard-sync.timer publishes within 15
  minutes. check_patch_targets.py resolves all 30 patch targets statically so
  that failure is loud instead of silent. It is landed before any split for
  exactly that reason.

The gate is red at 52 files; the splits that follow drive it to zero.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK3HCZrM75sRHL1gL8usve
2026-08-15 16:35:01 +02:00

74 lines
2.1 KiB
YAML

name: diet_guard_app
description: "Companion phone app for diet_guard: log meals on the go."
publish_to: 'none'
version: 1.0.12+1
environment:
sdk: ^3.12.2
dependencies:
crdt_sync:
git:
url: https://github.com/kuhyx/utils
ref: crdt_sync_dart-v0.10.0
path: crdt_sync_dart
crypto: ^3.0.6
flutter:
sdk: flutter
flutter_local_notifications: ^22.0.1
flutter_secure_storage: ^10.3.1
# One-tap sign-in for the sync account. App-side only: crdt_sync stays pure
# Dart so it keeps working on Linux desktop and headless.
github_device_auth:
git:
url: https://github.com/kuhyx/utils
ref: github_device_auth-v0.3.0
path: github_device_auth
google_sign_in: ^7.2.0
http: ^1.6.0
idb_shim: ^2.9.6+2
path: ^1.9.1
path_provider: ^2.1.5
permission_handler: ^12.0.3
shared_preferences: ^2.5.5
# Shared "Sync settings" screen (Firebase + optional local backup), reused
# across every kuhy app that syncs. GitHub mirror stays app-local (see
# lib/screens/github_mirror_screen.dart) since connecting it here also
# triggers a real log sync, not just a settings save.
sync_settings_ui:
git:
url: https://github.com/kuhyx/utils
ref: sync_settings_ui-v0.1.0
path: sync_settings_ui
url_launcher: ^6.3.2
uuid: ^4.5.3
web: ^1.1.1
workmanager: ^0.9.0+3
dev_dependencies:
# Generates the Android launcher icons from assets/icon/ (see
# python_pkg/app_icons in testsAndMisc for the shared style).
flutter_launcher_icons: ^0.14.4
flutter_test:
sdk: flutter
url_launcher_platform_interface: ^2.3.2
very_good_analysis: ^10.2.0
flutter:
uses-material-design: true
# Launcher icon generation. Source art is produced by the shared generator:
# PYTHONPATH=~/testsAndMisc python3 -m python_pkg.app_icons generate --app <key>
# then run: dart run flutter_launcher_icons
flutter_launcher_icons:
android: true
ios: false
image_path: "assets/icon/icon.png"
adaptive_icon_background: "#211D1B"
adaptive_icon_foreground: "assets/icon/icon_foreground.png"
adaptive_icon_monochrome: "assets/icon/icon_monochrome.png"
min_sdk_android: 21