mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +08:00
Don't show warning when prepEnv copies gradlew and it's read-only
This commit is contained in:
parent
bca7f62efd
commit
0b86db8748
6
bin/templates/cordova/lib/build.js
vendored
6
bin/templates/cordova/lib/build.js
vendored
@ -305,9 +305,11 @@ var builders = {
|
||||
var sdkDir = process.env['ANDROID_HOME'];
|
||||
var wrapperDir = path.join(sdkDir, 'tools', 'templates', 'gradle', 'wrapper');
|
||||
if (process.platform == 'win32') {
|
||||
shell.cp('-f', path.join(wrapperDir, 'gradlew.bat'), projectPath);
|
||||
shell.rm('-f', path.join(wrapperDir, 'gradlew.bat'), projectPath);
|
||||
shell.cp(path.join(wrapperDir, 'gradlew.bat'), projectPath);
|
||||
} else {
|
||||
shell.cp('-f', path.join(wrapperDir, 'gradlew'), projectPath);
|
||||
shell.rm('-f', path.join(wrapperDir, 'gradlew'), projectPath);
|
||||
shell.cp(path.join(wrapperDir, 'gradlew'), projectPath);
|
||||
}
|
||||
shell.rm('-rf', path.join(projectPath, 'gradle', 'wrapper'));
|
||||
shell.mkdir('-p', path.join(projectPath, 'gradle'));
|
||||
|
Loading…
Reference in New Issue
Block a user