codeplay-common 1.6.1 → 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[^>]*android:theme="[^"]*"/,
56
+ /<activity[^>]*?>/,
58
57
  (match) => {
59
- return match.replace(/android:theme="[^"]*"/, 'android:theme="@style/Theme.Codeplay.SplashScreen"');
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 with new theme.`);
84
+ console.log(`Updated AndroidManifest.xml: ensured resizeableActivity="false" and updated theme if present.`);
65
85
  }
66
86
 
67
87
  // Perform the tasks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",