codeplay-common 3.2.18 → 4.0.0
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.
- package/LICENSE +21 -21
- package/README.md +19 -12
- package/files/buildCodeplay/codeplayBeforeBuild-6.1.js +302 -129
- package/files/buildCodeplay/ios-emi-admob-modification.js +25 -28
- package/files/buildCodeplay/manifestModification.js +12 -10
- package/files/buildCodeplay/remove-force-kotlin-disable.js +43 -45
- package/files/buildCodeplay/versions.json +2 -2
- package/files/finalrelease +960 -960
- package/files/iap-install-2.js +145 -145
- package/files/ionic.config.json +6 -6
- package/package.json +16 -16
- package/scripts/sync-files.js +86 -86
- package/scripts/uninstall.js +77 -77
- package/files/buildCodeplay/modify-plugin-xml.js +0 -36
|
@@ -19,15 +19,17 @@ const addToolAttribute=()=>{
|
|
|
19
19
|
let manifest = fs.readFileSync(manifestPath, 'utf8');
|
|
20
20
|
|
|
21
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('✅
|
|
27
|
-
} else {
|
|
28
|
-
console.log('ℹ️
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
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('✅ Added xmlns:tools to AndroidManifest.xml');
|
|
27
|
+
} else {
|
|
28
|
+
console.log('ℹ️ xmlns:tools already exists, skipping...');
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
console.log('ℹ️ capacitor-cordova-android-plugins AndroidManifest.xml not found, skipping tools namespace update.');
|
|
32
|
+
}
|
|
33
|
+
};
|
|
32
34
|
|
|
33
35
|
addToolAttribute()
|
|
@@ -1,45 +1,43 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
'node_modules'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
});
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const legacyPluginXmlPath = path.resolve(
|
|
5
|
+
__dirname,
|
|
6
|
+
'../node_modules/emi-indo-cordova-plugin-admob/plugin.xml'
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
const nextGenPackagePath = path.resolve(
|
|
10
|
+
__dirname,
|
|
11
|
+
'../node_modules/capacitor-admob-nextgen/package.json'
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
if (!fs.existsSync(legacyPluginXmlPath)) {
|
|
15
|
+
if (fs.existsSync(nextGenPackagePath)) {
|
|
16
|
+
console.log('ℹ️ Skipping legacy Kotlin patch. capacitor-admob-nextgen is installed and does not use plugin.xml.');
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
console.log('ℹ️ Legacy AdMob plugin.xml not found, skipping Kotlin patch.');
|
|
21
|
+
process.exit(0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
fs.readFile(legacyPluginXmlPath, 'utf8', (err, data) => {
|
|
25
|
+
if (err) {
|
|
26
|
+
console.error('Error reading plugin.xml:', err);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const modifiedData = data.replace(
|
|
31
|
+
/<framework\s+src="src\/android\/force-kotlin\.gradle"\s+custom="true"\s+type="gradleReference"\s*\/>\s*\n?/g,
|
|
32
|
+
''
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
fs.writeFile(legacyPluginXmlPath, modifiedData, 'utf8', (writeErr) => {
|
|
36
|
+
if (writeErr) {
|
|
37
|
+
console.error('Error writing plugin.xml:', writeErr);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
console.log('plugin.xml updated successfully.');
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{"name":"backbutton","pattern":"backbutton-(\\d+\\.\\d+)\\.js$","minVersion":"2.1","baseDir":"js","mandatoryUpdate":true},
|
|
4
4
|
{"name":"common-js","pattern":"common-(\\d+\\.\\d+)(?:-beta-(\\d+))?\\.js$","minVersion":"6.2","baseDir":"js","mandatoryUpdate":true},
|
|
5
5
|
|
|
6
|
-
{"name":"admob-emi","pattern":"Ads[\\\\/]admob-emi-(\\d+\\.\\d+)\\.js$","minVersion":"
|
|
6
|
+
{"name":"admob-emi-nextgen","pattern":"Ads[\\\\/]admob-emi-nextgen-(\\d+\\.\\d+)\\.js$","minVersion":"1.0","baseDir":"js","mandatoryUpdate":true},
|
|
7
7
|
{"name":"video-player","pattern":"video-player-(\\d+\\.\\d+)\\.js$","minVersion":"1.6","baseDir":"js","mandatoryUpdate":true},
|
|
8
8
|
{"name":"image-cropper","pattern":"image-cropper-(\\d+\\.\\d+)\\.js$","minVersion":"1.1","baseDir":"js","mandatoryUpdate":true},
|
|
9
9
|
{"name":"beautify","pattern":"beautify-(\\d+\\.\\d+)\\.js$","minVersion":"1.1","baseDir":"js","mandatoryUpdate":true},
|
|
@@ -24,4 +24,4 @@
|
|
|
24
24
|
{"name":"onesignal","pattern":"onesignal-(\\d+\\.\\d+)\\.js$","minVersion":"2.4","baseDir":"js","mandatoryUpdate":true},
|
|
25
25
|
{"name":"saveToGalleryAndSaveAnyFile","pattern":"saveToGalleryAndSaveAnyFile-(\\d+\\.\\d+)(-ios)?\\.js$","minVersion":"3.1","baseDir":"js","mandatoryUpdate":true}
|
|
26
26
|
]
|
|
27
|
-
}
|
|
27
|
+
}
|