fix: copy gradle wrapper from tools to platform root dir (#1781)

This commit is contained in:
エリス 2025-03-18 10:55:43 +09:00 committed by GitHub
parent aad36fe565
commit ff11f659f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,6 +18,7 @@
*/
const fs = require('node:fs');
const fsp = require('node:fs/promises');
const path = require('node:path');
const execa = require('execa');
const glob = require('fast-glob');
@ -289,6 +290,10 @@ class ProjectBuilder {
.then(function () {
events.emit('verbose', `Using Gradle: ${config.GRADLE_VERSION}`);
return self.installGradleWrapper(config.GRADLE_VERSION);
}).then(async function () {
await fsp.cp(path.join(self.root, 'tools', 'gradle'), path.join(self.root, 'gradle'), { recursive: true, force: true });
await fsp.cp(path.join(self.root, 'tools', 'gradlew'), path.join(self.root, 'gradlew'), { recursive: true, force: true });
await fsp.cp(path.join(self.root, 'tools', 'gradlew.bat'), path.join(self.root, 'gradlew.bat'), { recursive: true, force: true });
}).then(function () {
return self.prepBuildFiles();
}).then(() => {