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

[Android] Adds namespace to module build file templates #126963

Merged
merged 13 commits into from May 23, 2023

Conversation

camsim99
Copy link
Contributor

@camsim99 camsim99 commented May 16, 2023

Adds namespace to module build.gradle file templates.

Fixes #126403.

Pre-launch Checklist

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

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 16, 2023
@camsim99
Copy link
Contributor Author

Looks like some tests are failing because they need multidex support. Not sure how they are related but I can update this PR

@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label May 23, 2023
@auto-submit auto-submit bot merged commit 31a665c into flutter:master May 23, 2023
124 checks passed
@vbuberen
Copy link

I am bit late to this PR, but curios why the template for the new project needs a check for compatibility with AGP < 4.2? It is not some plugin and there is no need to have such compatibility. Even if the template is used to create a module for existing Android app as mentioned in the issue, Android devs tend to keep their projects up to date better than Flutter ones and definitely won't use such old versions of AGP as pre-4.2.

@stuartmorgan
Copy link
Contributor

It is not some plugin

It is a module, which means it's intended for use in projects we don't directly control, so has the same fundamental compatibility concerns.

Android devs tend to keep their projects up to date better than Flutter ones and definitely won't use such old versions of AGP as pre-4.2.

Do you have metrics showing that nobody using the module build has a project with AGP 4.1?

@vbuberen
Copy link

It is a module, which means it's intended for use in projects we don't directly control, so has the same fundamental compatibility concerns.

We already had this discussion with you in Plus Plugins, so don't want to continue and would prefer to agree that we disagree here on this topic.

Do you have metrics showing that nobody using the module build has a project with AGP 4.1?

I didn't say nobody. No, I don't have such metric, but it is something that you can get from the team responsible for releases of AGP as they might have such info. But as Android developer I know that sticking to old AGP in your project means that you consciously not using the latest optimisations for builds and new features. Also, build.gradle of your Android project is the same things as pubspec.yaml for Flutter devs and Android devs update dependencies there, including AGP (which is also updated with every release of Android Studio). In any of Android native projects I consulted or worked on I have seen build.gradle having AGP version older than 1 year. 4.2 is already 2 years old, thus, people with < 4.2 using something really old and it is hard to call a maintained project.

auto-submit bot pushed a commit to flutter/packages that referenced this pull request May 23, 2023
flutter/flutter@3437189...f86c529

2023-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 431ed51c6415 to 168b0bf3f70d (1 revision) (flutter/flutter#127382)
2023-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from cc79ae858591 to 431ed51c6415 (1 revision) (flutter/flutter#127381)
2023-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 311438399a45 to cc79ae858591 (1 revision) (flutter/flutter#127377)
2023-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from c284cd10e7ab to 311438399a45 (1 revision) (flutter/flutter#127376)
2023-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8d6602b030be to c284cd10e7ab (2 revisions) (flutter/flutter#127372)
2023-05-23 tessertaha@gmail.com Add M3 date picker tests and fix divider (flutter/flutter#127197)
2023-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2586cbeeae37 to 8d6602b030be (2 revisions) (flutter/flutter#127370)
2023-05-23 engine-flutter-autoroll@skia.org Manual roll Flutter Engine from a342a9186e69 to 2586cbeeae37 (14 revisions) (flutter/flutter#127369)
2023-05-23 43054281+camsim99@users.noreply.github.com [Android] Adds `namespace` to module build file templates (flutter/flutter#126963)
2023-05-23 zanderso@users.noreply.github.com Revert Engine to a342a9186e69 (flutter/flutter#127368)
2023-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2a325eed77d0 to 41e8d52a006a (2 revisions) (flutter/flutter#127365)
2023-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from a342a9186e69 to 2a325eed77d0 (7 revisions) (flutter/flutter#127364)
2023-05-23 parlough@gmail.com Remove null-safety argument from DartPad doc samples (flutter/flutter#127345)
2023-05-22 daniel.iglesia@gmail.com Support keeping a bottom sheet with a DraggableScrollableSheet from closing on drag/fling to min extent (flutter/flutter#127339)
2023-05-22 jacksongardner@google.com Fix wasm-opt location when using local_web_sdk (flutter/flutter#127355)
2023-05-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1ed9fc0caf55 to a342a9186e69 (3 revisions) (flutter/flutter#127352)
2023-05-22 louisehsu@google.com Show warning when attempting to flutter run on an ios device with developer mode turned off (flutter/flutter#125710)
2023-05-22 ian@hixie.ch Suggest that people move to "beta" when they upgrade on "master" (flutter/flutter#127146)
2023-05-22 andrewrkolos@gmail.com add test for setting JAVA_HOME and PATH when invoking `sdkmanager --licenses` (flutter/flutter#127344)
2023-05-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from e04c14786d5a to 1ed9fc0caf55 (1 revision) (flutter/flutter#127343)
2023-05-22 38299943+VictorOhashi@users.noreply.github.com fix: Search anchor box location when used on nested navigator (flutter/flutter#127198)
2023-05-22 christopherfujino@gmail.com [flutter_tools] delete entitlements files after copying to macos build dir (flutter/flutter#126875)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@reidbaker
Copy link
Contributor

It is a module, which means it's intended for use in projects we don't directly control, so has the same fundamental compatibility concerns.

We already had this discussion with you in Plus Plugins, so don't want to continue and would prefer to agree that we disagree here on this topic.

Do you have metrics showing that nobody using the module build has a project with AGP 4.1?

I didn't say nobody. No, I don't have such metric, but it is something that you can get from the team responsible for releases of AGP as they might have such info. But as Android developer I know that sticking to old AGP in your project means that you consciously not using the latest optimisations for builds and new features. Also, build.gradle of your Android project is the same things as pubspec.yaml for Flutter devs and Android devs update dependencies there, including AGP (which is also updated with every release of Android Studio). In any of Android native projects I consulted or worked on I have seen build.gradle having AGP version older than 1 year. 4.2 is already 2 years old, thus, people with < 4.2 using something really old and it is hard to call a maintained project.

Thank you for your engagement and concern for flutter. In this case there are 2 reasons why I encouraged @camsim99 to include agp 4.1 backwards compatibility. First is that we know about the compatibility issue and to keep compatibility is safe, easy to maintain, and straightforward to maintain. That alone would be a good reason for writing compatible code. The second is that flutter support many kinds of developers. Educational use including students and teachers, side projects, ios/mac/windows only developers that want to run on android and developers that maintain dozens or hundreds of apps which may or may not ever be published by any app store. As a philosophy we try to make it easy for all kinds of developers to adopt new versions of flutter, new versions of packages and build new apps with the least amount of manual maintenance as we can get away with.

So for this cl compatibility is in the spirit/philosophy of the flutter project.

CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 24, 2023
…6963)

Adds `namespace` to module `build.gradle` file templates.

Fixes flutter#126403.
camsim99 added a commit to camsim99/flutter that referenced this pull request Jun 6, 2023
…6963)

Adds `namespace` to module `build.gradle` file templates.

Fixes flutter#126403.
auto-submit bot pushed a commit that referenced this pull request Jun 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[add-to-app] error : Namespace not specified. Please specify a namespace in the module's build.gradle
5 participants