Commit e01e4c18 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Fix various gradle paths for Windows (#8935)

parent dfb6198f
...@@ -38,7 +38,9 @@ String get gradleExecutable { ...@@ -38,7 +38,9 @@ String get gradleExecutable {
if (gradleDir != null) { if (gradleDir != null) {
if (fs.isFileSync(gradleDir)) if (fs.isFileSync(gradleDir))
return 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; return androidStudio?.gradleExecutable ?? os.which('gradle')?.path;
} }
......
...@@ -105,7 +105,9 @@ String locateSystemGradle({ bool ensureExecutable: true }) { ...@@ -105,7 +105,9 @@ String locateSystemGradle({ bool ensureExecutable: true }) {
} }
String locateProjectGradlew({ 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)) { if (fs.isFileSync(path)) {
final File gradle = fs.file(path); final File gradle = fs.file(path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment