codeplay-common 1.9.5 → 1.9.7
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.
|
@@ -242,6 +242,11 @@ const ANDROID_FILE_REGEX = /^(?!\s*\/\/).*['"](?:.*\/)?saveToGalleryAndSaveAnyFi
|
|
|
242
242
|
let androidImportFound = false;
|
|
243
243
|
|
|
244
244
|
function scanDirectory(dir) {
|
|
245
|
+
|
|
246
|
+
const appUniqueId = config.android?.APP_UNIQUE_ID;
|
|
247
|
+
if(appUniqueId=="206")
|
|
248
|
+
return;
|
|
249
|
+
|
|
245
250
|
const stat = fs.statSync(dir);
|
|
246
251
|
|
|
247
252
|
if (stat.isFile()) {
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
// Path to the plugin.xml file
|
|
5
|
-
const pluginXmlPath = path.join('node_modules', 'emi-indo-cordova-plugin-admob', 'plugin.xml');
|
|
6
|
-
|
|
7
|
-
// Get the store ID from the environment variable
|
|
8
|
-
const storeId = process.env.VITE_STORE_ID || '1';
|
|
9
|
-
|
|
10
|
-
// Determine the framework to use based on storeId
|
|
11
|
-
const framework = storeId === '7'
|
|
12
|
-
? '<framework src="com.google.android.gms:play-services-ads:$PLAY_SERVICES_VERSION" />'
|
|
13
|
-
: '<framework src="com.google.android.gms:play-services-ads-lite:24.
|
|
14
|
-
|
|
15
|
-
// Read and modify the plugin.xml file
|
|
16
|
-
fs.readFile(pluginXmlPath, 'utf8', (err, data) => {
|
|
17
|
-
if (err) {
|
|
18
|
-
console.error('Error reading plugin.xml:', err);
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Replace the existing framework line with the selected one
|
|
23
|
-
const modifiedData = data.replace(
|
|
24
|
-
/<framework src="com.google.android.gms:play-services-ads.*" \/>\n/,
|
|
25
|
-
`${framework}\n`
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
// Write the modified content back to plugin.xml
|
|
29
|
-
fs.writeFile(pluginXmlPath, modifiedData, 'utf8', (err) => {
|
|
30
|
-
if (err) {
|
|
31
|
-
console.error('Error writing plugin.xml:', err);
|
|
32
|
-
process.exit(1);
|
|
33
|
-
}
|
|
34
|
-
console.log('plugin.xml updated successfully.');
|
|
35
|
-
});
|
|
36
|
-
});
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
// Path to the plugin.xml file
|
|
5
|
+
const pluginXmlPath = path.join('node_modules', 'emi-indo-cordova-plugin-admob', 'plugin.xml');
|
|
6
|
+
|
|
7
|
+
// Get the store ID from the environment variable
|
|
8
|
+
const storeId = process.env.VITE_STORE_ID || '1';
|
|
9
|
+
|
|
10
|
+
// Determine the framework to use based on storeId
|
|
11
|
+
const framework = storeId === '7'
|
|
12
|
+
? '<framework src="com.google.android.gms:play-services-ads:$PLAY_SERVICES_VERSION" />'
|
|
13
|
+
: '<framework src="com.google.android.gms:play-services-ads-lite:24.6.0" />';
|
|
14
|
+
|
|
15
|
+
// Read and modify the plugin.xml file
|
|
16
|
+
fs.readFile(pluginXmlPath, 'utf8', (err, data) => {
|
|
17
|
+
if (err) {
|
|
18
|
+
console.error('Error reading plugin.xml:', err);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Replace the existing framework line with the selected one
|
|
23
|
+
const modifiedData = data.replace(
|
|
24
|
+
/<framework src="com.google.android.gms:play-services-ads.*" \/>\n/,
|
|
25
|
+
`${framework}\n`
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
// Write the modified content back to plugin.xml
|
|
29
|
+
fs.writeFile(pluginXmlPath, modifiedData, 'utf8', (err) => {
|
|
30
|
+
if (err) {
|
|
31
|
+
console.error('Error writing plugin.xml:', err);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
34
|
+
console.log('plugin.xml updated successfully.');
|
|
35
|
+
});
|
|
36
|
+
});
|