VeryGoodOpenSource / very_good_templates

Collection of open-source templates created and maintained by Very Good Ventures.
61 stars 11 forks source link

very_good did not add {{android_namespace} or {{android_application_id}} in app/build.gradle #186

Closed large closed 1 month ago

large commented 1 month ago

Description Flame game out-of-the-box did not compile for Android.

Steps To Reproduce Use very_cli 0.22.2 and create a project: very_good create flame_game some_game

βœ“ Generated 343 file(s) (5.8s) βœ“ Running "flutter pub get" in . (5.3s) βœ“ Running "dart fix --apply" in ./some_game (8.4s)

Created a Very Good Game powered by Flame! πŸ”₯πŸ¦„

File generated are missing {{android_namespace} and {{android_application_id}} inn android/app/build.gradle Needed manually change to same namespace com.example.verygoodcore.some_game, since all other files was changed.

Expected Behavior Compile without any need to change namespace and appID.

Additional Context

[βœ“] Flutter (Channel stable, 3.24.1, on macOS 14.6.1 23G93 darwin-arm64, locale nb-NO) [βœ“] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [βœ“] Xcode - develop for iOS and macOS (Xcode 15.4) [βœ“] Chrome - develop for the web [βœ“] Android Studio (version 2024.1) [βœ“] Connected device (4 available)
[βœ“] Network resources

β€’ No issues found!

tomarra commented 1 month ago

Hi @large πŸ‘‹ Thanks for opening this issue. We are going to attempt to reproduce but could you also ensure you update to the latest Very Good CLI 0.23.0 and retest as well? If either of us are able to reproduce would you be willing to help fix the issue as well?

alestiago commented 1 month ago

I was able to reproduce using Very Good CLI 0.23.0, this is indeed a valid issue and should be fixed ASAP.

large commented 1 month ago

Also noticed that the lib/gen/assets.gen.dart files are generated by the package https://pub.dev/packages/flutter_gen But that is not documented into the project out-of-the-box. Best practice should be to include all assets used.

alestiago commented 1 month ago

Hi @large, so we have a fix for this and we will be soon releasing, but first we need to unblock the pipeline due to the latest Flame release (1.19.0) that introduces a breaking change in a minor, affecting flame_behaviors (a dependency the template relies on).

Regarding the other issue about the flutter_gen, that is being tracked over here https://github.com/VeryGoodOpenSource/very_good_cli/issues/1099. It doesn't seem to be a template issue (flutter_gen, is not a hosted main dependency), instead it seems that the flutter l10n tooling resolves for the hosted flutter_gen package rather than the internal one generated by the Flutter tooling.