feat(android): scaffold Capacitor 8 native project + hardware Back button
Add @capacitor/{core,android,app,cli,assets} to ui/, a capacitor.config.ts (appId ru.eruditgame.app, appName Эрудит, webDir dist — bundle model, no server.url), and the generated ui/android/ Gradle project (tracked; build outputs and the machine-specific local.properties gitignored, keystore patterns un-commented so signing material can never be committed). Wire the Android hardware Back button in ui/src/lib/native.ts behind a dynamic @capacitor/app import (web/mock bundles never load it), called from App.svelte onMount and reusing routeDepth for the navigation-root check. Whitelist sharp in pnpm-workspace.yaml for @capacitor/assets icon generation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import type { CapacitorConfig } from '@capacitor/cli';
|
||||
|
||||
const config: CapacitorConfig = {
|
||||
appId: 'ru.eruditgame.app',
|
||||
appName: 'Эрудит',
|
||||
webDir: 'dist',
|
||||
// Bundle model: no server.url — the WebView loads the packaged dist/ from app assets. Updates
|
||||
// ship through the store; the client-version gate turns away a build too old to speak the
|
||||
// current wire contract (docs/ARCHITECTURE.md §2).
|
||||
};
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user