Ship Android app by wrapping the web build with Capacitor (#20) (#28)
Unit Tests / test (push) Successful in 11s
Unit Tests / test (push) Successful in 11s
## Summary - Closes #20 - Add Capacitor 7 to `llm-fe/` (`capacitor.config.ts`, appId `com.aimloperations.chat`, `webDir: build`) and commit the generated `android/` project - npm scripts: `build:mobile` (`.env.mobile` + CRA build + `cap sync`), `android:open`, `android:sync`, `assets:generate` - `.env.mobile` defaults to prod backend; override independently of web deploys - Native chrome: Android back button (history / exit at root), status bar + keyboard resize, safe-area CSS; Preferences registered for JWT mirror (#22) - Icons/splash via `@capacitor/assets`; signing via optional `keystore.properties`; docs in `llm-fe/ANDROID.md` + root README Blockers #22 / #23 / #24 already on master. ## Test plan - [x] `npm run test:ci` (79 tests) - [x] `npm run build` + `npx cap add android` / `cap sync` - [ ] `npm run build:mobile` + open in Android Studio on a machine with SDK - [ ] Emulator/device QA: login, chat stream, theme, back button, keyboard/safe-area, WS resume - [ ] Generate upload keystore outside repo; `./gradlew bundleRelease` for internal testing trackReviewed-on: #28
This commit was merged in pull request #28.
This commit is contained in:
@@ -3,6 +3,13 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@capacitor/android": "^7.6.8",
|
||||
"@capacitor/app": "^7.1.2",
|
||||
"@capacitor/cli": "^7.6.8",
|
||||
"@capacitor/core": "^7.6.8",
|
||||
"@capacitor/keyboard": "^7.0.6",
|
||||
"@capacitor/preferences": "^7.0.4",
|
||||
"@capacitor/status-bar": "^7.0.6",
|
||||
"@emotion/cache": "^11.14.0",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
@@ -41,6 +48,10 @@
|
||||
"build": "NODE_ENV=production react-scripts build",
|
||||
"build:prod": "NODE_ENV=production react-scripts build && mkdir -p /var/www/prod.chat.aimloperations/html && cp -r ./build/* /var/www/prod.chat.aimloperations/html/",
|
||||
"build:beta": "bash -c 'set -a; source .env.beta; set +a; NODE_ENV=production react-scripts build' && mkdir -p /var/www/beta.chat.aimloperations/html && cp -r ./build/* /var/www/beta.chat.aimloperations/html/",
|
||||
"build:mobile": "bash -c 'set -a; source .env.mobile; set +a; NODE_ENV=production react-scripts build' && npx cap sync android",
|
||||
"android:open": "npx cap open android",
|
||||
"android:sync": "npx cap sync android",
|
||||
"assets:generate": "npx capacitor-assets generate --android",
|
||||
"test": "NODE_ENV=development react-scripts test",
|
||||
"test:ci": "CI=true NODE_ENV=development react-scripts test --watchAll=false --coverage=false",
|
||||
"eject": "react-scripts eject"
|
||||
@@ -64,6 +75,7 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@capacitor/assets": "^3.0.5",
|
||||
"@types/bootstrap": "~5.2.10",
|
||||
"@types/lodash": "~4.17.13",
|
||||
"@types/react": "^18.3.16",
|
||||
|
||||
Reference in New Issue
Block a user