Files
AFFiNE-Mirror/packages/frontend/apps/android/capacitor.config.ts
T
DarkSky 1d36e2e4b2 feat(core): improve mobile perf (#15317)
#### PR Dependency Tree


* **PR #15317** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Virtualized mobile navigation with shell navigation and interactive
swipe menus; coordinated mobile back handling with interactive
phases/state restoration.
* Added shared auth request proxy and message-port based token handling
across mobile and worker flows.
* **Bug Fixes**
  * Hydrated remote worker error stacks for calls and observable errors.
* Improved SQLite FTS/indexer and nbstore optional text handling;
refined docs-search ref parsing and notification loading/retry.
* **Refactor / UX**
* Modal focus-preservation and pointer behavior updates; improved mobile
menu controls and back gesture plugins.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-23 00:23:21 +08:00

55 lines
1.2 KiB
TypeScript

import { readFileSync } from 'node:fs';
import { join, resolve } from 'node:path';
import type { CapacitorConfig } from '@capacitor/cli';
const packageJson = JSON.parse(
readFileSync(resolve(__dirname, './package.json'), 'utf-8')
);
const capServerUrl = process.env.CAP_SERVER_URL;
const allowsCleartextServer = capServerUrl?.startsWith('http://') ?? false;
interface AppConfig {
affineVersion: string;
}
const config: CapacitorConfig & AppConfig = {
appId: 'app.affine.pro',
appName: 'AFFiNE',
webDir: 'dist',
affineVersion: packageJson.version,
android: {
path: 'App',
buildOptions: {
keystorePath: join(__dirname, 'affine.keystore'),
keystorePassword: process.env.AFFINE_ANDROID_KEYSTORE_PASSWORD,
keystoreAlias: 'key0',
keystoreAliasPassword: process.env.AFFINE_ANDROID_KEYSTORE_ALIAS_PASSWORD,
releaseType: 'AAB',
},
},
plugins: {
SystemBars: {
insetsHandling: 'css',
},
CapacitorHttp: {
enabled: false,
},
CapacitorCookies: {
enabled: false,
},
},
};
if (capServerUrl) {
Object.assign(config, {
server: {
url: capServerUrl,
cleartext: allowsCleartextServer,
},
});
}
export default config;