From e0b182e61a82fdcde08c0d53d991719fd5573d6d Mon Sep 17 00:00:00 2001 From: Greg Spencer Date: Mon, 8 Oct 2018 09:38:37 -0700 Subject: [PATCH] Fix gradle error in devicelab tests (#22814) Fixes a gradle error where it was failing to find a plugin because of an absolute path in the .flutter-plugins file instead of a relative path. I had originally removed this variable because I thought it was redundant with the projectDir, but apparently I was wrong about that (one resolves to a relative path, and one resolves to an absolute path). This PR reverts that part of the change and reintroduces the (not really) redundant variable. --- packages/flutter_tools/lib/src/commands/create.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index d5f7056a73..0fec5f0efd 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart @@ -279,20 +279,21 @@ class CreateCommand extends FlutterCommand { } else { printStatus('Recreating project $relativeDirPath...'); } + final Directory relativeDir = fs.directory(projectDirPath); int generatedFileCount = 0; switch (template) { case _ProjectType.app: - generatedFileCount += await _generateLegacyApp(projectDir, templateContext); + generatedFileCount += await _generateLegacyApp(relativeDir, templateContext); break; case _ProjectType.module: case _ProjectType.application: - generatedFileCount += await _generateApplication(projectDir, templateContext); + generatedFileCount += await _generateApplication(relativeDir, templateContext); break; case _ProjectType.package: - generatedFileCount += await _generatePackage(projectDir, templateContext); + generatedFileCount += await _generatePackage(relativeDir, templateContext); break; case _ProjectType.plugin: - generatedFileCount += await _generatePlugin(projectDir, templateContext); + generatedFileCount += await _generatePlugin(relativeDir, templateContext); break; } printStatus('Wrote $generatedFileCount files.');