[update] ci

This commit is contained in:
2022-05-24 15:37:14 +08:00
parent afa2ed6b3b
commit e03a55c980
5 changed files with 12932 additions and 2949 deletions

View File

@@ -16,6 +16,10 @@ function main() {
let gradle_file = fs.readFileSync('./node_modules/cordova-android/lib/builders/ProjectBuilder.js').toString('utf-8');
let replaceFileContent = gradle_file.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}';`)
fs.writeFileSync('./node_modules/cordova-android/lib/builders/ProjectBuilder.js', replaceFileContent)
// http加载
let http = fs.readFileSync('./platforms/android/app/src/main/AndroidManifest.xml').toString('utf-8');
let httpFileContent = http.replace('<application', `<application android:usesCleartextTraffic="true"`)
fs.writeFileSync('./platforms/android/app/src/main/AndroidManifest.xml', httpFileContent)
});
revRun.stdout.on('data', function (data) {
console.log(chalk.green(data));