codeplay-common 3.1.4 → 3.1.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.
@@ -2024,6 +2024,8 @@ const validateAndRestoreSignDetails=()=>{
2024
2024
  validateAndRestoreSignDetails()
2025
2025
 
2026
2026
 
2027
+ execSync('node buildCodeplay/fix-onesignal-plugin.js', { stdio: 'inherit' });
2028
+
2027
2029
  /*
2028
2030
  Release Notes
2029
2031
 
@@ -0,0 +1,47 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ const pluginPath = path.join(
5
+ __dirname,
6
+ "..",
7
+ "node_modules",
8
+ "onesignal-cordova-plugin",
9
+ "plugin.xml"
10
+ );
11
+
12
+ if (!fs.existsSync(pluginPath)) {
13
+ console.log("OneSignal plugin not found, skipping patch.");
14
+ process.exit(0);
15
+ }
16
+
17
+ console.log("OneSignal plugin patch started.");
18
+
19
+ let content = fs.readFileSync(pluginPath, "utf8");
20
+
21
+ /* ---- Prevent running twice ---- */
22
+ if (content.includes("buildCodeplay/fix-onesignal-plugin.js")) {
23
+ console.log("OneSignal plugin already patched.");
24
+ process.exit(0);
25
+ }
26
+
27
+ /* ---- Comment Kotlin dependency ---- */
28
+ content = content.replace(
29
+ '<framework src="org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10" />',
30
+ `<!-- Disabled: causes Kotlin version conflict with modern Gradle/Kotlin -->
31
+ <!-- <framework src="org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10" /> -->`
32
+ );
33
+
34
+ /* ---- Add dependencies ---- */
35
+ content = content.replace(
36
+ '<framework src="build-extras-onesignal.gradle" custom="true" type="gradleReference" />',
37
+ `<framework src="build-extras-onesignal.gradle" custom="true" type="gradleReference" />
38
+
39
+ <!--Newly added content through buildCodeplay/fix-onesignal-plugin.js Start-->
40
+ <framework src="com.fasterxml.jackson.core:jackson-core:2.17.2" />
41
+ <framework src="com.google.auto.value:auto-value-annotations:1.11.0" scope="provided" />
42
+ <!--Newly added content through buildCodeplay/fix-onesignal-plugin.js End-->`
43
+ );
44
+
45
+ fs.writeFileSync(pluginPath, content);
46
+
47
+ console.log("OneSignal plugin patched successfully.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",