Fix various gradle paths for Windows (#8935)

This commit is contained in:
Michael Goderbauer 2017-03-22 12:31:53 -07:00 committed by GitHub
parent dfb6198feb
commit e01e4c18e1
2 changed files with 6 additions and 2 deletions

View File

@ -38,7 +38,9 @@ String get gradleExecutable {
if (gradleDir != null) {
if (fs.isFileSync(gradleDir))
return gradleDir;
return fs.path.join(gradleDir, 'bin', 'gradle');
return fs.path.join(
gradleDir, 'bin', platform.isWindows ? 'gradle.bat' : 'gradle'
);
}
return androidStudio?.gradleExecutable ?? os.which('gradle')?.path;
}

View File

@ -105,7 +105,9 @@ String locateSystemGradle({ bool ensureExecutable: true }) {
}
String locateProjectGradlew({ bool ensureExecutable: true }) {
final String path = 'android/gradlew';
final String path = fs.path.join(
'android', platform.isWindows ? 'gradlew.bat' : 'gradlew'
);
if (fs.isFileSync(path)) {
final File gradle = fs.file(path);