feat(mobile): improve android edgeless & ci (#15118)
#### PR Dependency Tree * **PR #15118** 👈 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 * **Chores** * Improved mobile CI workflow with change-aware Android/iOS build jobs and updated completion dependencies so tests wait for the relevant mobile builds. * **Performance / App Behavior** * Enhanced Android WebView behavior: improved viewport/WebView tuning, disabled zoom and scrollbars, and made mixed-content allowance environment-aware (debug vs non-debug). * Adjusted Android cleartext traffic handling based on build/debug settings and Capacitor server URL configuration. * **Tests** * Strengthened Electron BYOK storage tests with per-test temporary directories, mock control, and added coverage for when secure storage is unavailable. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -7,6 +7,9 @@ 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;
|
||||
}
|
||||
@@ -27,9 +30,6 @@ const config: CapacitorConfig & AppConfig = {
|
||||
},
|
||||
adjustMarginsForEdgeToEdge: 'force',
|
||||
},
|
||||
server: {
|
||||
cleartext: true,
|
||||
},
|
||||
plugins: {
|
||||
CapacitorHttp: {
|
||||
enabled: false,
|
||||
@@ -40,10 +40,11 @@ const config: CapacitorConfig & AppConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
if (process.env.CAP_SERVER_URL) {
|
||||
if (capServerUrl) {
|
||||
Object.assign(config, {
|
||||
server: {
|
||||
url: process.env.CAP_SERVER_URL,
|
||||
url: capServerUrl,
|
||||
cleartext: allowsCleartextServer,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user