-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Steps to Reproduce
- Create flutter project on a linux system with a case-sensitive file system
- Create flavors for the project with upper-case letters
- build appbundle for android
Expected results: builds successfully
Actual results: does not. e.g.
Gradle build failed to produce an .aab file. It's likely that this file was generated under <PATH>, but the tool couldn't find it.
<asynchronous suspension>
#8 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#9 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#10 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#11 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#12 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14 main (package:flutter_tools/executable.dart:92:3)
<asynchronous suspension>
I'm guessing this is the result of
| .childDirectory('${buildInfo.lowerCasedFlavor}${camelCase('_${buildInfo.modeName}')}') |
lowerCasedFlavor instead of flavor
I assume the fix would involve either switching to flavor or ensuring the output directory for the flavor is lowercased.
This does NOT reproduce on a mac machine and probably doesn't repro on windows as they are case insensitive by default.
I did write a quick test as well and verified the outputted path is incorrect by adding print of the search paths in the referenced file.
Also as an aside the aab was correctly output and signed despite the build process failing. Given the location in code of the exception, this really only seems to prevent the output of the final line which says ✓ Built <OUTPUT_PATH> (<SIZE>MB). and then causes the build to have a non-zero exit which prevents any CI system from progressing successfully.