[update] ci

This commit is contained in:
陶林 2022-05-24 14:58:21 +08:00
parent b4dd70007a
commit 918bcf1676

View File

@ -15,7 +15,7 @@ function main() {
console.log(process.env.CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL); console.log(process.env.CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL);
let gradle_file = fs.readFileSync('./node_modules/cordova-android/lib/builders/ProjectBuilder.js').toString('utf-8'); let gradle_file = fs.readFileSync('./node_modules/cordova-android/lib/builders/ProjectBuilder.js').toString('utf-8');
console.log(gradle_file); console.log(gradle_file);
let replaceFileContent = oldFile.replace('const distributionUrl = process.env.CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL || `https://services.gradle.org/distributions/gradle-${config.GRADLE_VERSION}-all.zip`;', `const distributionUrl = ${gradle_cdn};`) let replaceFileContent = oldFile.replace('https://services.gradle.org/distributions/gradle-${config.GRADLE_VERSION}-all.zip', `${gradle_cdn};`)
fs.writeFileSync('./node_modules/cordova-android/lib/builders/ProjectBuilder.js', replaceFileContent) fs.writeFileSync('./node_modules/cordova-android/lib/builders/ProjectBuilder.js', replaceFileContent)
}); });
revRun.stdout.on('data', function (data) { revRun.stdout.on('data', function (data) {