codeplay-common 1.6.0 → 1.6.2
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.
|
@@ -52,16 +52,36 @@ function updateAndroidManifest() {
|
|
|
52
52
|
|
|
53
53
|
let manifestContent = fs.readFileSync(androidManifestPath, "utf-8");
|
|
54
54
|
|
|
55
|
-
// Replace the android:theme attribute in the <activity> tag
|
|
56
55
|
manifestContent = manifestContent.replace(
|
|
57
|
-
/<activity[^>]
|
|
56
|
+
/<activity[^>]*?>/,
|
|
58
57
|
(match) => {
|
|
59
|
-
|
|
58
|
+
let updated = match;
|
|
59
|
+
|
|
60
|
+
// If android:theme is already present, update it
|
|
61
|
+
if (updated.includes('android:theme=')) {
|
|
62
|
+
updated = updated.replace(
|
|
63
|
+
/android:theme="[^"]*"/,
|
|
64
|
+
'android:theme="@style/Theme.Codeplay.SplashScreen"'
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// If android:resizeableActivity is already present, update it
|
|
69
|
+
if (updated.includes('android:resizeableActivity=')) {
|
|
70
|
+
updated = updated.replace(
|
|
71
|
+
/android:resizeableActivity="[^"]*"/,
|
|
72
|
+
'android:resizeableActivity="false"'
|
|
73
|
+
);
|
|
74
|
+
} else {
|
|
75
|
+
// Add resizeableActivity attribute
|
|
76
|
+
updated = updated.replace('<activity', '<activity android:resizeableActivity="false"');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return updated;
|
|
60
80
|
}
|
|
61
81
|
);
|
|
62
82
|
|
|
63
83
|
fs.writeFileSync(androidManifestPath, manifestContent, "utf-8");
|
|
64
|
-
console.log(`Updated AndroidManifest.xml
|
|
84
|
+
console.log(`Updated AndroidManifest.xml: ensured resizeableActivity="false" and updated theme if present.`);
|
|
65
85
|
}
|
|
66
86
|
|
|
67
87
|
// Perform the tasks
|
|
@@ -8,7 +8,7 @@ const requiredPlugins = [
|
|
|
8
8
|
{ pattern: /backbutton-(\d+\.\d+)\.js$/, minVersion: '1.2', required: true },
|
|
9
9
|
{ pattern: /common-(\d+\.\d+)\.js$/, minVersion: '3.5', required: true },
|
|
10
10
|
{ pattern: /localization_settings-(\d+\.\d+)\.js$/, minVersion: '1.1', required: true },
|
|
11
|
-
{ pattern: /localization-(\d+\.\d+)\.js$/, minVersion: '1.
|
|
11
|
+
{ pattern: /localization-(\d+\.\d+)\.js$/, minVersion: '1.3', required: true },
|
|
12
12
|
{ pattern: /localNotification-(\d+\.\d+)\.js$/, minVersion: '2.2', required: true },
|
|
13
13
|
{ pattern: /localNotification_AppSettings-(\d+\.\d+)\.js$/, minVersion: '1.0', required: true },
|
|
14
14
|
{ pattern: /onesignal-(\d+\.\d+)\.js$/, minVersion: '2.1', required: true },
|