mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Fix various gradle paths for Windows (#8935)
This commit is contained in:
parent
dfb6198feb
commit
e01e4c18e1
@ -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 }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user