From 85bccf4a46f0e77958856d22648a1d42fbbd13f3 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 27 Oct 2026 19:24:59 -0700 Subject: [PATCH] chore: only set the demo network security config for retry test builds The demo app's main manifest pointed every build at a committed network_security_config.xml. Generate the config and a debug manifest only when -PRETRY_TEST_CA is passed, so normal builds carry no debug-overrides trust anchors. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 9bd96270b636d964ecad8328be7b4dabc934ea7b) Co-authored-by: Cursor --- examples/demo/app/build.gradle.kts | 9 +++++++++ examples/demo/app/src/main/AndroidManifest.xml | 1 - .../app/src/main/res/xml/network_security_config.xml | 9 --------- 3 files changed, 9 insertions(+), 10 deletions(-) delete mode 100644 examples/demo/app/src/main/res/xml/network_security_config.xml diff --git a/examples/demo/app/build.gradle.kts b/examples/demo/app/build.gradle.kts index d7e7907851..b15664cb79 100644 --- a/examples/demo/app/build.gradle.kts +++ b/examples/demo/app/build.gradle.kts @@ -160,7 +160,16 @@ demoOverride("RETRY_TEST_CA")?.let { caPath -> """.trimIndent(), ) } + val manifest = layout.buildDirectory.file("generated/retryTestCa/AndroidManifest.xml").get().asFile + manifest.writeText( + """ + + + + """.trimIndent(), + ) android.sourceSets.getByName("debug").res.srcDir(resDir) + android.sourceSets.getByName("debug").manifest.srcFile(manifest) } dependencies { diff --git a/examples/demo/app/src/main/AndroidManifest.xml b/examples/demo/app/src/main/AndroidManifest.xml index cd06b9aa51..c91d1c923a 100644 --- a/examples/demo/app/src/main/AndroidManifest.xml +++ b/examples/demo/app/src/main/AndroidManifest.xml @@ -21,7 +21,6 @@ android:allowBackup="true" android:icon="@mipmap/ic_onesignal_launcher" android:label="@string/app_name" - android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_onesignal_launcher" android:supportsRtl="true" android:theme="@style/AppTheme" diff --git a/examples/demo/app/src/main/res/xml/network_security_config.xml b/examples/demo/app/src/main/res/xml/network_security_config.xml deleted file mode 100644 index 3e57ccf4c9..0000000000 --- a/examples/demo/app/src/main/res/xml/network_security_config.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - -