codeplay-common 2.1.22 → 2.1.23
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.
|
@@ -1328,31 +1328,6 @@ validateThemeFolderLocation()
|
|
|
1328
1328
|
|
|
1329
1329
|
|
|
1330
1330
|
|
|
1331
|
-
const addToolAttribute=()=>{
|
|
1332
|
-
//const platformRoot = path.join(context.opts.projectRoot, 'android');
|
|
1333
|
-
//const manifestPath = path.join(platformRoot, 'capacitor-cordova-android-plugins/src/main/AndroidManifest.xml');
|
|
1334
|
-
|
|
1335
|
-
const manifestPath = path.resolve(__dirname, '../android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml');
|
|
1336
|
-
|
|
1337
|
-
if (fs.existsSync(manifestPath)) {
|
|
1338
|
-
let manifest = fs.readFileSync(manifestPath, 'utf8');
|
|
1339
|
-
|
|
1340
|
-
// Check if xmlns:tools exists
|
|
1341
|
-
if (!manifest.includes('xmlns:tools="http://schemas.android.com/tools"')) {
|
|
1342
|
-
// Add the tools namespace to the <manifest> tag.
|
|
1343
|
-
manifest = manifest.replace('<manifest', '<manifest xmlns:tools="http://schemas.android.com/tools"');
|
|
1344
|
-
fs.writeFileSync(manifestPath, manifest, 'utf8');
|
|
1345
|
-
console.log('✅ EMI-ADMob: Added xmlns:tools to AndroidManifest.xml');
|
|
1346
|
-
} else {
|
|
1347
|
-
console.log('ℹ️ EMI-ADMob: xmlns:tools already exists, skipping...');
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
};
|
|
1351
|
-
|
|
1352
|
-
addToolAttribute()
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
1331
|
|
|
1357
1332
|
|
|
1358
1333
|
/*
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const plist = require('plist');
|
|
4
|
+
|
|
5
|
+
const { readFileSync } = require("fs");
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const addToolAttribute=()=>{
|
|
13
|
+
//const platformRoot = path.join(context.opts.projectRoot, 'android');
|
|
14
|
+
//const manifestPath = path.join(platformRoot, 'capacitor-cordova-android-plugins/src/main/AndroidManifest.xml');
|
|
15
|
+
|
|
16
|
+
const manifestPath = path.resolve(__dirname, '../android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml');
|
|
17
|
+
|
|
18
|
+
if (fs.existsSync(manifestPath)) {
|
|
19
|
+
let manifest = fs.readFileSync(manifestPath, 'utf8');
|
|
20
|
+
|
|
21
|
+
// Check if xmlns:tools exists
|
|
22
|
+
if (!manifest.includes('xmlns:tools="http://schemas.android.com/tools"')) {
|
|
23
|
+
// Add the tools namespace to the <manifest> tag.
|
|
24
|
+
manifest = manifest.replace('<manifest', '<manifest xmlns:tools="http://schemas.android.com/tools"');
|
|
25
|
+
fs.writeFileSync(manifestPath, manifest, 'utf8');
|
|
26
|
+
console.log('✅ EMI-ADMob: Added xmlns:tools to AndroidManifest.xml');
|
|
27
|
+
} else {
|
|
28
|
+
console.log('ℹ️ EMI-ADMob: xmlns:tools already exists, skipping...');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
addToolAttribute()
|
package/package.json
CHANGED
package/scripts/sync-files.js
CHANGED
|
@@ -67,7 +67,7 @@ if (latestCodeplayBuild) {
|
|
|
67
67
|
packageJson.scripts["build"] = `node buildCodeplay/${latestCodeplayBuild} && node buildCodeplay/${latestPackageIdModification} && cross-env NODE_ENV=production vite build --logLevel warn`;
|
|
68
68
|
}
|
|
69
69
|
if (latestSplashScreen && latestSplashAnimation) {
|
|
70
|
-
packageJson.scripts["capacitor:sync:after"] = ` node buildCodeplay/${latestSplashScreen} && node buildCodeplay/${latestSplashAnimation}`;
|
|
70
|
+
packageJson.scripts["capacitor:sync:after"] = ` node buildCodeplay/${latestSplashScreen} && node buildCodeplay/${latestSplashAnimation} && node buildCodeplay/manifestModification.js`;
|
|
71
71
|
//node buildCodeplay/ios-emi-admob-modification.js &&
|
|
72
72
|
}
|
|
73
73
|
|