fix: creation of cdv-gradle-config.json w/ --link flag

This commit is contained in:
エリス 2024-12-28 23:30:41 +09:00
parent d9f256aaf0
commit ccdd881cdb
No known key found for this signature in database
GPG Key ID: 2E5FF17FB26AF7F2

View File

@ -55,6 +55,7 @@ function copyJsAndLibrary (projectPath, shared, projectName, targetAPI) {
// The www dir is nuked on each prepare so we keep cordova.js in platform_www
fs.ensureDirSync(platform_www);
fs.copySync(srcCordovaJsPath, path.join(platform_www, 'cordova.js'));
fs.copySync(path.join(ROOT, 'framework', 'cdv-gradle-config-defaults.json'), path.join(projectPath, 'cdv-gradle-config.json'));
if (shared) {
const relativeFrameworkPath = path.relative(projectPath, getFrameworkDir(projectPath, true));
@ -69,7 +70,6 @@ function copyJsAndLibrary (projectPath, shared, projectName, targetAPI) {
fs.copySync(path.join(ROOT, 'framework', 'cordova.gradle'), path.join(nestedCordovaLibPath, 'cordova.gradle'));
fs.copySync(path.join(ROOT, 'framework', 'repositories.gradle'), path.join(nestedCordovaLibPath, 'repositories.gradle'));
fs.copySync(path.join(ROOT, 'framework', 'src'), path.join(nestedCordovaLibPath, 'src'));
fs.copySync(path.join(ROOT, 'framework', 'cdv-gradle-config-defaults.json'), path.join(projectPath, 'cdv-gradle-config.json'));
}
}