codeplay-common 4.11.30 → 4.11.32

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +115 -115
  2. package/LICENSE +21 -21
  3. package/README.md +368 -368
  4. package/RELEASE_NOTES.md +97 -97
  5. package/files/buildCodeplay/HUAWEI-PRIVACY.md +9 -9
  6. package/files/buildCodeplay/add-splash-screen.js +255 -255
  7. package/files/buildCodeplay/apk-store-builder.js +97 -97
  8. package/files/buildCodeplay/codeplayBeforeBuild.js +4769 -4756
  9. package/files/buildCodeplay/disabled-ads.mjs +45 -45
  10. package/files/buildCodeplay/ensure-current-build.cjs +42 -42
  11. package/files/buildCodeplay/fix-onesignal-plugin.js +96 -96
  12. package/files/buildCodeplay/huawei-privacy-entry.js +135 -135
  13. package/files/buildCodeplay/huawei-privacy.cjs +92 -92
  14. package/files/buildCodeplay/huawei-privacy.css +22 -22
  15. package/files/buildCodeplay/iap-alias.cjs +108 -116
  16. package/files/buildCodeplay/ios-ad-consent.cjs +56 -56
  17. package/files/buildCodeplay/ios-emi-admob-modification.js +49 -49
  18. package/files/buildCodeplay/manifestModification.js +38 -38
  19. package/files/buildCodeplay/migrate-system-bars.cjs +122 -115
  20. package/files/buildCodeplay/newly added.txt +89 -89
  21. package/files/buildCodeplay/non-google-billing.pro +3 -3
  22. package/files/buildCodeplay/packageidBaseModification.js +528 -528
  23. package/files/buildCodeplay/project-scripts.cjs +69 -69
  24. package/files/buildCodeplay/release-sync.config.json +4 -4
  25. package/files/buildCodeplay/remove-force-kotlin-disable.js +43 -43
  26. package/files/buildCodeplay/ruads.cjs +211 -211
  27. package/files/buildCodeplay/saf-mediastore-dependency.cjs +21 -21
  28. package/files/buildCodeplay/setSplashAnimation.js +226 -226
  29. package/files/buildCodeplay/setup-ruads.cjs +55 -55
  30. package/files/buildCodeplay/splashxml/codeplay_splashScreen.xml +11 -11
  31. package/files/buildCodeplay/store-billing.cjs +43 -43
  32. package/files/buildCodeplay/sync-admob-nextgen.js +219 -219
  33. package/files/buildCodeplay/tests/huawei-privacy.test.cjs +49 -49
  34. package/files/buildCodeplay/tests/huawei-vite.test.cjs +35 -35
  35. package/files/buildCodeplay/versions.json +28 -28
  36. package/files/finalrelease +1365 -1365
  37. package/files/generate-ai-promo-video.js +23 -23
  38. package/files/ionic.config.json +6 -6
  39. package/files/scripts-common/generate-baseline-profile.js +46 -46
  40. package/files/scripts-common/run-codeplay-sync-after.js +21 -21
  41. package/files/scripts-common/screenshot/background-decorations.js +120 -120
  42. package/files/scripts-common/screenshot/frame-samples.js +117 -117
  43. package/files/scripts-common/setup-baseline-profile.js +291 -291
  44. package/files/take-screen-image.js +4414 -4414
  45. package/files/take-screen-video.js +644 -644
  46. package/package.json +3 -2
  47. package/runtime/vk-ads/vk-ad-configuration.json +39 -39
  48. package/scripts/ensure-current-build.test.cjs +76 -76
  49. package/scripts/iap-alias.test.cjs +78 -117
  50. package/scripts/ios-ad-consent.test.cjs +99 -99
  51. package/scripts/ruads-install.test.cjs +180 -180
  52. package/scripts/ruads-policy.test.cjs +174 -174
  53. package/scripts/saf-mediastore-dependency.test.cjs +44 -44
  54. package/scripts/sync-files.js +120 -120
  55. package/scripts/system-bars-package.test.cjs +38 -0
  56. package/scripts/system-bars.test.cjs +93 -77
  57. package/scripts/uninstall.js +2 -2
  58. package/scripts/vite-build-settings.test.cjs +92 -92
@@ -1,98 +1,98 @@
1
- const { spawn } = require("child_process");
2
- const path = require("path");
3
- const fs = require("fs");
4
-
5
- // Paths
6
- //const projectRoot = path.join(__dirname, "..");
7
- const projectRoot = process.cwd();
8
- const androidPath = path.join(projectRoot, "android");
9
- const capacitorConfigPath = path.join(projectRoot, "capacitor.config.json");
10
-
11
- // Read capacitor.config.json
12
- if (!fs.existsSync(capacitorConfigPath)) {
13
- console.error("❌ capacitor.config.json not found!");
14
- process.exit(1);
15
- }
16
-
17
- const config = JSON.parse(fs.readFileSync(capacitorConfigPath, "utf8"));
18
-
19
- const buildOptions = config.android?.buildOptions;
20
-
21
- if (!buildOptions) {
22
- console.error("❌ android.buildOptions not found in capacitor.config.json");
23
- process.exit(1);
24
- }
25
-
26
- // Resolve keystore path (relative → absolute)
27
-
28
-
29
- const storePassword = buildOptions.keystorePassword;
30
- const keyAlias = buildOptions.keystoreAlias;
31
- const keyPassword = buildOptions.keystoreAliasPassword;
32
-
33
-
34
-
35
-
36
-
37
-
38
- const rawKeystorePath = buildOptions.keystorePath;
39
-
40
- // First try normal resolve
41
- let keystorePath = path.resolve(projectRoot, rawKeystorePath);
42
-
43
- // If not found, try trimming one "../"
44
- if (!fs.existsSync(keystorePath)) {
45
- console.log("⚠️ Keystore not found, attempting path correction...");
46
-
47
- const trimmedPath = rawKeystorePath.replace(/^\.\.\//, "");
48
- keystorePath = path.resolve(projectRoot, trimmedPath);
49
- }
50
-
51
- // Final validation
52
- if (!fs.existsSync(keystorePath)) {
53
- console.error("❌ Keystore file not found even after correction:", keystorePath);
54
- process.exit(1);
55
- }
56
-
57
- console.log("🔐 Using keystore:", keystorePath);
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
- // Gradle args
69
- const isWindows = process.platform === "win32";
70
- const command = isWindows ? "cmd.exe" : "sh";
71
- const args = [
72
- ...(isWindows ? ["/c", "gradlew.bat"] : ["./gradlew"]),
73
- "assembleRelease",
74
- `-Pandroid.injected.signing.store.file=${keystorePath}`,
75
- `-Pandroid.injected.signing.store.password=${storePassword}`,
76
- `-Pandroid.injected.signing.key.alias=${keyAlias}`,
77
- `-Pandroid.injected.signing.key.password=${keyPassword}`,
78
- ];
79
-
80
- // Run Gradle
81
- const gradle = spawn(command, args, {
82
- cwd: androidPath,
83
- stdio: "inherit",
84
- });
85
-
86
- gradle.on("error", (error) => {
87
- console.error("❌ Could not start Gradle:", error.message);
88
- process.exit(1);
89
- });
90
-
91
- gradle.on("close", (code) => {
92
- if (code === 0) {
93
- console.log("\n✅ Signed APK Generated Successfully!");
94
- } else {
95
- console.log("\n❌ Build Failed with code:", code);
96
- process.exit(code ?? 1);
97
- }
1
+ const { spawn } = require("child_process");
2
+ const path = require("path");
3
+ const fs = require("fs");
4
+
5
+ // Paths
6
+ //const projectRoot = path.join(__dirname, "..");
7
+ const projectRoot = process.cwd();
8
+ const androidPath = path.join(projectRoot, "android");
9
+ const capacitorConfigPath = path.join(projectRoot, "capacitor.config.json");
10
+
11
+ // Read capacitor.config.json
12
+ if (!fs.existsSync(capacitorConfigPath)) {
13
+ console.error("❌ capacitor.config.json not found!");
14
+ process.exit(1);
15
+ }
16
+
17
+ const config = JSON.parse(fs.readFileSync(capacitorConfigPath, "utf8"));
18
+
19
+ const buildOptions = config.android?.buildOptions;
20
+
21
+ if (!buildOptions) {
22
+ console.error("❌ android.buildOptions not found in capacitor.config.json");
23
+ process.exit(1);
24
+ }
25
+
26
+ // Resolve keystore path (relative → absolute)
27
+
28
+
29
+ const storePassword = buildOptions.keystorePassword;
30
+ const keyAlias = buildOptions.keystoreAlias;
31
+ const keyPassword = buildOptions.keystoreAliasPassword;
32
+
33
+
34
+
35
+
36
+
37
+
38
+ const rawKeystorePath = buildOptions.keystorePath;
39
+
40
+ // First try normal resolve
41
+ let keystorePath = path.resolve(projectRoot, rawKeystorePath);
42
+
43
+ // If not found, try trimming one "../"
44
+ if (!fs.existsSync(keystorePath)) {
45
+ console.log("⚠️ Keystore not found, attempting path correction...");
46
+
47
+ const trimmedPath = rawKeystorePath.replace(/^\.\.\//, "");
48
+ keystorePath = path.resolve(projectRoot, trimmedPath);
49
+ }
50
+
51
+ // Final validation
52
+ if (!fs.existsSync(keystorePath)) {
53
+ console.error("❌ Keystore file not found even after correction:", keystorePath);
54
+ process.exit(1);
55
+ }
56
+
57
+ console.log("🔐 Using keystore:", keystorePath);
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+ // Gradle args
69
+ const isWindows = process.platform === "win32";
70
+ const command = isWindows ? "cmd.exe" : "sh";
71
+ const args = [
72
+ ...(isWindows ? ["/c", "gradlew.bat"] : ["./gradlew"]),
73
+ "assembleRelease",
74
+ `-Pandroid.injected.signing.store.file=${keystorePath}`,
75
+ `-Pandroid.injected.signing.store.password=${storePassword}`,
76
+ `-Pandroid.injected.signing.key.alias=${keyAlias}`,
77
+ `-Pandroid.injected.signing.key.password=${keyPassword}`,
78
+ ];
79
+
80
+ // Run Gradle
81
+ const gradle = spawn(command, args, {
82
+ cwd: androidPath,
83
+ stdio: "inherit",
84
+ });
85
+
86
+ gradle.on("error", (error) => {
87
+ console.error("❌ Could not start Gradle:", error.message);
88
+ process.exit(1);
89
+ });
90
+
91
+ gradle.on("close", (code) => {
92
+ if (code === 0) {
93
+ console.log("\n✅ Signed APK Generated Successfully!");
94
+ } else {
95
+ console.log("\n❌ Build Failed with code:", code);
96
+ process.exit(code ?? 1);
97
+ }
98
98
  });