38 lines
1.4 KiB
TypeScript
38 lines
1.4 KiB
TypeScript
import type { CapacitorConfig } from '@capacitor/cli';
|
|
|
|
// Live reload (scripts/android-dev.mjs): the app loads the Vite dev server instead of the bundled build.
|
|
// Only set while syncing for development; a normal `build:android` bundles the web build.
|
|
const devUrl = process.env.CAP_DEV_URL;
|
|
|
|
const config: CapacitorConfig = {
|
|
appId: 'com.aggtaa.cardy',
|
|
appName: 'Cardy',
|
|
webDir: 'dist-capacitor',
|
|
backgroundColor: '#0f1115',
|
|
// No Capacitor logging even in debug builds: it writes plugin results (e.g. the stored access key
|
|
// read from Preferences) and the JS console to logcat. Debug JS via chrome://inspect instead.
|
|
loggingBehavior: 'none',
|
|
android: {
|
|
backgroundColor: '#0f1115',
|
|
},
|
|
plugins: {
|
|
// Live updates in manual mode (src/updater.ts): the app decides when to check, download and apply.
|
|
CapacitorUpdater: {
|
|
autoUpdate: 'off',
|
|
// Never talk to Capgo's cloud: no stats/telemetry, no update or channel requests.
|
|
statsUrl: '',
|
|
updateUrl: '',
|
|
channelUrl: '',
|
|
// A new bundle must call notifyAppReady() within this time, otherwise it is rolled back.
|
|
appReadyTimeout: 10000,
|
|
// A newly installed APK starts from its own built-in bundle.
|
|
resetWhenUpdate: true,
|
|
autoDeleteFailed: true,
|
|
autoDeletePrevious: true,
|
|
},
|
|
},
|
|
...(devUrl ? { server: { url: devUrl, cleartext: true } } : {}),
|
|
};
|
|
|
|
export default config;
|