Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pascalfriedrich opened this issue May 14, 2024 · 1 comment

Comments

@pascalfriedrich
Copy link

pascalfriedrich commented May 14, 2024

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants