Skip to content

Commit ff11f65

Browse files
authored
fix: copy gradle wrapper from tools to platform root dir (apache#1781)
1 parent aad36fe commit ff11f65

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/builders/ProjectBuilder.js

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
const fs = require('node:fs');
21+
const fsp = require('node:fs/promises');
2122
const path = require('node:path');
2223
const execa = require('execa');
2324
const glob = require('fast-glob');
@@ -289,6 +290,10 @@ class ProjectBuilder {
289290
.then(function () {
290291
events.emit('verbose', `Using Gradle: ${config.GRADLE_VERSION}`);
291292
return self.installGradleWrapper(config.GRADLE_VERSION);
293+
}).then(async function () {
294+
await fsp.cp(path.join(self.root, 'tools', 'gradle'), path.join(self.root, 'gradle'), { recursive: true, force: true });
295+
await fsp.cp(path.join(self.root, 'tools', 'gradlew'), path.join(self.root, 'gradlew'), { recursive: true, force: true });
296+
await fsp.cp(path.join(self.root, 'tools', 'gradlew.bat'), path.join(self.root, 'gradlew.bat'), { recursive: true, force: true });
292297
}).then(function () {
293298
return self.prepBuildFiles();
294299
}).then(() => {

0 commit comments

Comments
 (0)