mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the ability to retrieve the system navigation bar height on Android devices. - **Bug Fixes** - Removed duplicate internal code to improve stability. - **Chores** - Removed the dependency on the edge-to-edge support package and related configuration and code. - Updated configuration to adjust margins for edge-to-edge layouts. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
52 lines
1.1 KiB
TypeScript
52 lines
1.1 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')
|
|
);
|
|
|
|
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',
|
|
},
|
|
adjustMarginsForEdgeToEdge: 'force',
|
|
},
|
|
server: {
|
|
cleartext: true,
|
|
},
|
|
plugins: {
|
|
CapacitorHttp: {
|
|
enabled: false,
|
|
},
|
|
CapacitorCookies: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
};
|
|
|
|
if (process.env.CAP_SERVER_URL) {
|
|
Object.assign(config, {
|
|
server: {
|
|
url: process.env.CAP_SERVER_URL,
|
|
},
|
|
});
|
|
}
|
|
|
|
export default config;
|