From afa2ed6b3ba1d98f73f4e563920ee452dcc90a0c Mon Sep 17 00:00:00 2001 From: taoya7 Date: Tue, 24 May 2022 15:03:04 +0800 Subject: [PATCH] [update] ci --- cmd/init.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/init.js b/cmd/init.js index 61e1c40..e5c05cb 100644 --- a/cmd/init.js +++ b/cmd/init.js @@ -14,7 +14,7 @@ function main() { let gradle_cdn = 'https://alicdn.taoya.art/test/gradle-7.1.1-all.zip'; 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 replaceFileContent = gradle_file.replace('https://services.gradle.org/distributions/gradle-${config.GRADLE_VERSION}-all.zip', `${gradle_cdn};`) + 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) }); revRun.stdout.on('data', function (data) { diff --git a/package.json b/package.json index ca7ebf2..daeac60 100644 --- a/package.json +++ b/package.json @@ -35,4 +35,4 @@ "dotenv": "^16.0.1", "winston": "^3.7.2" } -} +} \ No newline at end of file