codeplay-common 4.9.4 → 4.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4448,6 +4448,21 @@ function syncAndroidBuildOptimization() {
4448
4448
  }
4449
4449
  // Android build optimization END
4450
4450
 
4451
+ function syncAndroidCordovaResourceKeep() {
4452
+ if (buildPlatform !== 'android' || !fs.existsSync(androidPlatformPath)) return;
4453
+
4454
+ // Cordova loads config.xml by name; preserve it even when no plugins are installed yet.
4455
+ const rawPath = path.join(androidPlatformPath, 'app', 'src', 'main', 'res', 'raw');
4456
+ const keepPath = path.join(rawPath, 'codeplay_cordova_keep.xml');
4457
+ const content = '<?xml version="1.0" encoding="utf-8"?>\n'
4458
+ + '<resources xmlns:tools="http://schemas.android.com/tools"\n'
4459
+ + ' tools:keep="@xml/config" />\n';
4460
+ if (fs.existsSync(keepPath) && fs.readFileSync(keepPath, 'utf8') === content) return;
4461
+
4462
+ fs.mkdirSync(rawPath, { recursive: true });
4463
+ fs.writeFileSync(keepPath, content, 'utf8');
4464
+ }
4465
+
4451
4466
  async function main() {
4452
4467
  validateThemeFolderLocation();
4453
4468
  validateAndRestoreSignDetails();
@@ -4467,6 +4482,7 @@ async function main() {
4467
4482
  checkAdmobConfigurationProperty();
4468
4483
  syncAndroidAdIdPermission();
4469
4484
  syncAndroidBuildOptimization();
4485
+ syncAndroidCordovaResourceKeep();
4470
4486
  }
4471
4487
 
4472
4488
  await main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "4.9.4",
3
+ "version": "4.9.5",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",