38 lines
2.2 KiB
Markdown
38 lines
2.2 KiB
Markdown
# 빌드 · 시험 · 저장소
|
|
|
|
Mac Pro 2013. Flutter 는 직접 설치하지 않고 podman 컨테이너로 쓴다(프로젝트는 홈 폴더 안에 있어야 podman machine 이 공유). 먼저 `podman machine start`.
|
|
|
|
```
|
|
podman run --rm -v "$PWD":/app -v fm-gradle:/root/.gradle -v fm-pub:/root/.pub-cache -w /app ghcr.io/cirruslabs/flutter:stable bash
|
|
python3 tool/android_patch.py
|
|
flutter pub get && flutter analyze && flutter test
|
|
flutter build apk --debug # build/app/outputs/flutter-apk/app-debug.apk
|
|
flutter test test_ux/shots_test.dart --update-goldens # 화면 캡처 test_ux/shots/
|
|
```
|
|
- 빌드할 때 시험을 같이 돌리지 않는다(podman 머신 8GB, Gradle 데몬이 꺼진 적 있음).
|
|
- 푸시: `git push origin main` 단독 명령(샌드박스 제외 설정). Gitea 토큰은 키체인.
|
|
- VS Code 터미널의 git 은 아이디를 창 맨 위 입력칸으로 묻는다.
|
|
|
|
## 처음 준비 (android/ 가 없을 때)
|
|
```
|
|
flutter create --platforms=android --org com.friendlymap --project-name friendly_map .
|
|
python3 tool/android_patch.py # 권한·수신기·desugaring·minSdk 23 (여러 번 돌려도 같음)
|
|
```
|
|
|
|
## 시험
|
|
```
|
|
tool/test_module.sh # 모듈 목록
|
|
tool/test_module.sh groups # 모듈 하나만
|
|
flutter test # 전체
|
|
python3 tool/check_modules.py # 줄 수·import 방향
|
|
cd server && python3 -m unittest test_mailbox test_verify # 보관함 서버
|
|
```
|
|
- 보관함 서버(선택): [[보관함 서버]]. 서버 주소를 설정 `mailbox_url` 에 넣으면 같은 네트워크 밖에서도 주고받는다.
|
|
|
|
## 저장소 규칙
|
|
- `build/`, `.dart_tool/`, `.claude/settings.local.json`, `wiki/.obsidian/workspace*.json` 은 올리지 않는다(.gitignore). `android/` 는 Gitea 에 올라가 있다.
|
|
- pubspec.lock 은 이 컨테이너(Flutter stable)에서 풀린 판 기준.
|
|
- 빌드 캐시 `-v fm-gradle:/root/.gradle -v fm-pub:/root/.pub-cache`. 컨테이너마다 SDK 34·35·CMake 를 다시 받아 15분 넘게 걸린다.
|
|
- 저장소: http://192.168.88.15:3180/diadmin/frindlymap (Gitea, remote origin).
|
|
- 화면 캡처: `flutter test test_ux/shots_test.dart --update-goldens` → `test_ux/shots/*.png` (한글 글꼴 `build/ux/kr.ttf` 필요: 맥의 `/Library/Fonts/Arial Unicode.ttf` 복사).
|