codeplay-common 4.8.5 → 4.8.7

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.
@@ -1358,6 +1358,28 @@ const resourcesPath = path.join(process.cwd(), 'resources', 'res');
1358
1358
  const androidResPath = path.join(process.cwd(), 'android', 'app', 'src', 'main', 'res');
1359
1359
  const localNotificationsPluginPath = path.join(process.cwd(), 'node_modules', '@capacitor', 'local-notifications');
1360
1360
 
1361
+ function syncAndroidCodeOptimization() {
1362
+ if (buildPlatform !== 'android') return;
1363
+
1364
+ if (!fs.existsSync(androidAppBuildGradlePath)) {
1365
+ throw new Error(`Android app build.gradle not found: ${androidAppBuildGradlePath}`);
1366
+ }
1367
+
1368
+ const currentContent = fs.readFileSync(androidAppBuildGradlePath, 'utf8');
1369
+ const nextContent = currentContent.replace(
1370
+ /getDefaultProguardFile\(\s*(['"])proguard-android\.txt\1\s*\)/g,
1371
+ "getDefaultProguardFile('proguard-android-optimize.txt')"
1372
+ );
1373
+
1374
+ if (!/getDefaultProguardFile\(\s*(['"])proguard-android-optimize\.txt\1\s*\)/.test(nextContent)) {
1375
+ throw new Error('Android code optimisation setup failed: expected default ProGuard configuration was not found.');
1376
+ }
1377
+
1378
+ if (nextContent !== currentContent) {
1379
+ fs.writeFileSync(androidAppBuildGradlePath, nextContent, 'utf8');
1380
+ }
1381
+ }
1382
+
1361
1383
  function fileExists(filePath) {
1362
1384
  return fs.existsSync(filePath);
1363
1385
  }
@@ -2956,7 +2978,8 @@ const CODEPLAY_SYSTEM_BARS_PLUGIN = "capacitor-codeplay-system-bars";
2956
2978
  function ensureMandatoryCapacitorPlugins() {
2957
2979
  const requiredPackages = [
2958
2980
  "@capacitor/device",
2959
- "@capacitor-community/in-app-review"
2981
+ "@capacitor-community/in-app-review",
2982
+ "@capawesome/capacitor-app-update"
2960
2983
  ];
2961
2984
 
2962
2985
  for (const packageName of requiredPackages) {
@@ -4304,6 +4327,7 @@ async function main() {
4304
4327
  checkAndupdateDropInViteConfig();
4305
4328
  checkAdmobConfigurationProperty();
4306
4329
  syncAndroidAdIdPermission();
4330
+ syncAndroidCodeOptimization();
4307
4331
  }
4308
4332
 
4309
4333
  await main();
@@ -4319,6 +4343,7 @@ await main();
4319
4343
  Release Notes
4320
4344
 
4321
4345
  6.5
4346
+ Android builds use the optimisation-enabled default ProGuard rules without changing minification settings or custom keep rules.
4322
4347
  Kids ad configuration disables iOS ATT prompts and excludes Android AD_ID during builds.
4323
4348
  Non-kids apps retain tracking prompts and normal permission behavior.
4324
4349
  Ad configuration migration preserves newer local configuration versions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "4.8.5",
3
+ "version": "4.8.7",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",