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

The module template triggers a warning when built #159729

Closed
mit-mit opened this issue Dec 3, 2024 · 3 comments · Fixed by #159770
Closed

The module template triggers a warning when built #159729

mit-mit opened this issue Dec 3, 2024 · 3 comments · Fixed by #159770
Assignees

Comments

@mit-mit
Copy link
Member

mit-mit commented Dec 3, 2024

Repro steps:

  1. Create a new module: flutter create -t module mymodule

  2. Run it: cd mymodule; flutter run -d [some android target]

Expected result: Runs with no warnings or errors

Actual result:

Launching lib/main.dart on sdk gphone16k arm64 in debug mode...
You are applying Flutter's main Gradle plugin imperatively using the apply script method,
which is deprecated and will be removed in a future release. 
Migrate to applying Gradle plugins with the declarative plugins block:
https://flutter.dev/to/flutter-gradle-plugin-apply

✓ Built build/host/outputs/apk/debug/app-debug.apk

Version info:

mit-macbookpro7:flumod mit$ flutter --version
Flutter 3.27.0-1.0.pre.665 • channel master • https://github.com/flutter/flutter.git
Framework • revision 7453ffd22d (5 days ago) • 2024-11-28 14:08:55 +0100
Engine • revision d7c0bcfe7a
Tools • Dart 3.7.0 (build 3.7.0-188.0.dev) • DevTools 2.41.0-dev.2
@gmackall
Copy link
Member

gmackall commented Dec 3, 2024

Looks like github is having issue atm, have a PR ready to create at
https://github.com/flutter/flutter/compare/master...gmackall:flutter:module_template_new_fgp_application?expand=1
but getting 500 errors when I try to actually make the pr.

Will try again in a little bit

github-merge-queue bot pushed a commit that referenced this issue Dec 5, 2024
…adle Plugin (#159770)

Fixes #159729

Cases to consider:
1. Building the module as a standalone app (`flutter run`)
2. Building the module as an aar (`flutter build aar`) 
3. Doing (2) and then building an android host app that depends on the
aar.
4. Building the host app with it depending on the module as source.

Manually tested all 4 and they all are working.

Modified `build_android_host_app_with_module_aar.dart` and
`build_android_host_app_with_module_source.dart` to add checks on
`stderr` to ensure we don't hit the log.


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <[email protected]>
@mit-mit
Copy link
Member Author

mit-mit commented Dec 9, 2024

@gmackall @reidbaker is this something we should consider cherry-picking?

flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this issue Dec 11, 2024
…adle Plugin (flutter#159770)

Fixes flutter#159729

Cases to consider:
1. Building the module as a standalone app (`flutter run`)
2. Building the module as an aar (`flutter build aar`) 
3. Doing (2) and then building an android host app that depends on the
aar.
4. Building the host app with it depending on the module as source.

Manually tested all 4 and they all are working.

Modified `build_android_host_app_with_module_aar.dart` and
`build_android_host_app_with_module_source.dart` to add checks on
`stderr` to ensure we don't hit the log.


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <[email protected]>
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants