-
If you are looking for help, please confirm the following...
Which mobile framework are you using?Flutter (Dart) Steps to reproducePre-build script appears to have stopped working? It was working fine yesterday and then a subsequent build generated the error:
On inspection of the build script logs I see:
So no actual file generation appears to have happened. Yesterday, I was using this version of envied.dart (which should get picked up by build_runner to generate envied.g.dart.
And in the Pre-build script I was just calling:
Once the error occured I changed envied.dart to:
And tried this instead in the script:
In both cases the project builds and funs fine locally on a simulator. Expected resultsThe build script should run build_runner and generate the necessary .g.dart file. Actual resultsNo output is generated, which gives rise to the file not found error in the build process. Build id (optional)No response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hey @schox, |
Beta Was this translation helpful? Give feedback.
Yes it is now successfully building, using both versions of the pre-build script I originally described in the issue:
I'm not certain what fixed it, but I have noticed that I occasionally need to run:
flutter pub run build_runner clean
before:
flutter pub run build_runner build --delete-conflicting-outputs
on local builds if the envied.g.dart does not get generated correctly. Perhaps this applies to Codemagic builds too. I haven't found a repeatable pattern here.
Also the only other file I edited during this period was pubspec.yaml. Maybe there was an extraneous character under here somewhere:
dev_dependencies:
build_runner: ^2.4.9
custom_lint: ^0.6.4
flutter_launcher_icons: ^0.13.1
envie…