mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 01:49:51 +08:00
feat(android): ai chat scaffold (#11124)
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> Co-authored-by: eyhn <cneyhn@gmail.com>
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
import { join } from 'node:path';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join, resolve } from 'node:path';
|
||||
|
||||
import type { CapacitorConfig } from '@capacitor/cli';
|
||||
|
||||
const config: CapacitorConfig = {
|
||||
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: {
|
||||
@@ -16,14 +26,25 @@ const config: CapacitorConfig = {
|
||||
releaseType: 'AAB',
|
||||
},
|
||||
},
|
||||
server: {
|
||||
cleartext: true,
|
||||
},
|
||||
plugins: {
|
||||
CapacitorHttp: {
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
},
|
||||
CapacitorCookies: {
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
if (process.env.CAP_SERVER_URL) {
|
||||
Object.assign(config, {
|
||||
server: {
|
||||
url: process.env.CAP_SERVER_URL,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user