Teach flutter tools to find gradle (#8241)

* Teach flutter tools to find gradle

Flutter tools will now use Gradle from Android Studio, which is now found automatically.

flutter doctor will verify that Android Studio has been installed, and that the included Gradle is at least version 2.14.1.

It is still possible to manually configure the path to Android Studio (flutter config --android-studio-dir=XXX) or Gradle (flutter config --gradle-dir=XXX), but this should only be necessary if they're installed somewhere non-standard.

Only tested on Linux and macOS for now.

Fixes #8131
This commit is contained in:
Jakob Andersen
2017-02-20 11:02:50 +01:00
committed by GitHub
parent df149c0b4b
commit 77efc38b67
8 changed files with 455 additions and 137 deletions

View File

@@ -46,6 +46,7 @@ void testUsingContext(String description, dynamic testMethod(), {
testContext.putIfAbsent(FileSystem, () => new LocalFileSystem());
testContext.putIfAbsent(ProcessManager, () => new LocalProcessManager());
testContext.putIfAbsent(Logger, () => new BufferLogger());
testContext.putIfAbsent(Config, () => new Config());
// Order-independent context entries
testContext.putIfAbsent(DeviceManager, () => new MockDeviceManager());
@@ -54,7 +55,6 @@ void testUsingContext(String description, dynamic testMethod(), {
testContext.putIfAbsent(HotRunnerConfig, () => new HotRunnerConfig());
testContext.putIfAbsent(Cache, () => new Cache());
testContext.putIfAbsent(Artifacts, () => new CachedArtifacts());
testContext.putIfAbsent(Config, () => new Config());
testContext.putIfAbsent(OperatingSystemUtils, () {
MockOperatingSystemUtils os = new MockOperatingSystemUtils();
when(os.isWindows).thenReturn(false);