Flutter build folder location

3,751 views
Skip to first unread message

Claudio Kloss

unread,
May 31, 2018, 10:30:46 AM5/31/18
to Flutter Dev
Does anyone know if there is a way to change the location of the build folder?

Chris Bracken

unread,
May 31, 2018, 11:53:11 AM5/31/18
to ckl...@gmail.com, Flutter Dev
Flutter supports a JSON-formatted file in your home directory named .flutter_settings that allows you to override this path. 

Specifically, creating it with the following contents:
  {build-dir: "somePath"}
will result in build outputs being written to somePath.

We don't specifically document this anywhere as far as I'm aware, and given its low level of usage, I imagine it's likely there are some bugs. If so, please report them.

Cheers,
Chris

On Thu, 31 May 2018 at 07:30, Claudio Kloss <ckl...@gmail.com> wrote:
Does anyone know if there is a way to change the location of the build folder?

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Bracken

unread,
May 31, 2018, 4:32:10 PM5/31/18
to ckl...@gmail.com, Flutter Dev
Thanks for the report -- would you mind filing a bug for this and cc me? Please include logs of a run of "flutter --verbose build ..." and note the desire for absolute path support.

As I say, it's a feature that we don't advertise, and that very likely hasn't been used by anyone in years; looks like it's bit-rotted.

Cheers,
Chris

On Thu, 31 May 2018 at 12:09, Claudio Kloss <ckl...@gmail.com> wrote:
Thank You for replying.

Here is what i found so far:
  • "somePath" must be relative or else we get an exception (_Exception: Exception: build-dir config setting in C:\Users\Claudio\AppData\Roaming\.flutter_settings must be relative)
  • "somePath" must exist or else we get another exception (FileSystemException: Cannot open file, path = '..\dev_build\Testes\teste\frontend_server.d')
  • After a complete build it only put 2 files on "somePath" ("app.dill" and "frontend_server.d"). All the others files went to the default "build" folder inside the project.
Maybe I'm doing something wrong...

Anyway I was hoping for something more like what we have with native android, like this:
buildDir = "C:/dev_build/android/${rootProject.name}/${project.name}"

Cheers,
Claudio Kloss


Message has been deleted

Chris Bracken

unread,
Jun 1, 2018, 3:45:45 PM6/1/18
to Claudio Kloss, Flutter Dev
Exactly - click the New Issue link from https://github.com/flutter/flutter/issues then fill out the details from there.

Thanks!

On Fri, 1 Jun 2018 at 09:50, Claudio Kloss <ckl...@gmail.com> wrote:
Just to be sure, what you mean is for me to create a new issue on github.com/flutter, right?

Claudio Kloss

unread,
Jun 1, 2018, 5:08:35 PM6/1/18
to Chris Bracken, Flutter Dev
Just to be sure, what you mean is for me to create a new issue on github.com/flutter, right?

Claudio Kloss

unread,
Jun 1, 2018, 5:08:35 PM6/1/18
to Chris Bracken, Flutter Dev
Thank You for replying.

Here is what i found so far:
  • "somePath" must be relative or else we get an exception (_Exception: Exception: build-dir config setting in C:\Users\Claudio\AppData\Roaming\.flutter_settings must be relative)
  • "somePath" must exist or else we get another exception (FileSystemException: Cannot open file, path = '..\dev_build\Testes\teste\frontend_server.d')
  • After a complete build it only put 2 files on "somePath" ("app.dill" and "frontend_server.d"). All the others files went to the default "build" folder inside the project.
Maybe I'm doing something wrong...

Anyway I was hoping for something more like what we have with native android, like this:
buildDir = "C:/dev_build/android/${rootProject.name}/${project.name}"

Cheers,
Claudio Kloss



On Thu, May 31, 2018 at 12:53 PM Chris Bracken <cbra...@google.com> wrote:

Claudio Kloss

unread,
Jun 1, 2018, 5:08:35 PM6/1/18
to Chris Bracken, Flutter Dev
Ok, I'll file a bug for this later.

Claudio Kloss

unread,
Jun 2, 2018, 10:02:56 AM6/2/18
to Fabio de Matos Quaresma Gonçalves, Flutter Dev, Chris Bracken
I've opened it : #18140  

On Fri, Jun 1, 2018 at 6:08 PM Fabio de Matos Quaresma Gonçalves <fmat...@gmail.com> wrote:
Pls also post bug # here, I'd like to follow what happens next.

this is also a file that should be added to .gitignore

Reply all
Reply to author
Forward
0 new messages