dart-lang / build

A build system for Dart written in Dart
https://pub.dev/packages/build
BSD 3-Clause "New" or "Revised" License
768 stars 205 forks source link

Build Runner is no longer creating app_localization.dart since Flutter 3.22 #3693

Open pascalfriedrich opened 1 month ago

pascalfriedrich commented 1 month ago

Hello, it seems that since Flutter 3.22 the build runner no longer creates the app_localization.dart. With Flutter 3.19 everything still worked. I have already toggled synthetic packages in the l10n.yaml config, but no success. There is no error message or at least a warning, even with --verbose flag.

l10n.yaml setup:

arb-dir: assets/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
untranslated-messages-file: assets/l10n/untranslated.txt

Flutter: 3.22.0 Dart SDK version: 3.4.0 build_runner: ^2.4.9 flutter_localizations: 0.2.0 flutter_gen_runner: ^5.4.0

macOS and Linux

Output:

Building package executable... 
Built build_runner:build_runner.
[INFO] Generating build script completed, took 222ms
[INFO] Precompiling build script... completed, took 2.6s
FlutterGen v5.4.0 Loading ... pubspec.yaml
[INFO] Building new asset graph completed, took 1.6s
[INFO] Checking for unexpected pre-existing outputs. completed, took 3ms
[INFO] Generating SDK summary completed, took 2.9s
[INFO] 30.3s elapsed, 2291/2305 actions completed.Generated: lib/app/core/resources/gen/assets.gen.dart
FlutterGen finished.
[INFO] Running build completed, took 33.2s
[INFO] Caching finalized dependency graph completed, took 424ms
[INFO] Succeeded after 33.6s with 292 outputs (4746 actions)
penkzhou commented 1 month ago

try to add flutter pub get after dart run build_runner build. the whole part in my github actions like this below:

      - name: Generate build runner
        run: |
          dart run build_runner build --delete-conflicting-outputs
          flutter pub get