-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[CP-beta]Update Android plugin templates for newer AGP #157100
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
[CP-beta]Update Android plugin templates for newer AGP #157100
Conversation
|
@stuartmorgan please fill out the PR description above, afterwards the release team will review this request. |
|
@reidbaker @gmackall Thoughts on cherry-picking this to the new beta? It seems like getting this out sooner rather than later will slightly reduce problems overall, and it's low risk, but it's also something that individual developers could do themselves (if they know to). |
I am for this CP |
|
I agree it is low risk and helpful, which is enough reason for me! |
|
@gmackall can I get you to reformat the change log description to follow these best practices. In the past this was something a release engineer would do but we are moving to having cherry pickers do it since they have a better understanding of the change. (or tell me to do it, i can do this one i am just running through the CP's this morning. |
|
@stuartmorgan this cherry-pick has failing tests that did not pass on rerun. |
|
@itsjustkevin Those failures don't look related to the PR (e.g., one is that a hot reload test is expecting a very specific success message and what's being output is a different success message). Are any CPs passing right now? |
|
@stuartmorgan looks like |
|
@bkonyi I think was looking at failures on that test. |
|
The failure on |
|
The failures on |
The check failure from build failure shows in the log The root cause for this is if the test uses newest The offending code final ProcessResult result2 = await processManager.run(
<String>[
flutterBin,
'pub',
'add',
'native_assets_cli',
],
workingDirectory: packageDirectory.path,
);
expect(result2, const ProcessResultMatcher());=> This was a problem in the test @reidbaker @bkonyi You may need to cherr-pick cc90a42. Iff the cherry-picks to branches also include updating pub dependencies (i.e. updated via |
Cherry-pick #158141. Unblocks #157100 (comment). This is a test-only change that works around `native_assets_cli` now being `0.9.0`.
…lutter#158395) Cherry-pick flutter#158141. Unblocks flutter#157100 (comment). This is a test-only change that works around `native_assets_cli` now being `0.9.0`.
| // updated to handled synchronized | ||
| // groups/folders https://github.com/CocoaPods/CocoaPods/issues/12456 | ||
| _logger.printError( | ||
| 'Error: CocoaPods does not support Xcode 16 synchronized groups. ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change related to the bug listed? #156111
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an issue from switching from the 3.26 branch target to the 3.27 branch target. I ended up doing a manual rebase and force pushed and that seems to have gotten rid of the unwanted changes.
Now that Flutter requires AGP 7+, we can use Java 11 as the compatibility version in the plugin template rather than 1.8, avoiding warnings with newer toolchains, and we can remove the check for 'namespace' existing that was only necessary to support AGP 4.1. See also flutter/packages#7795 which made this change in Flutter-team-owned plugins. Part of flutter#156111
4b59236 to
75b2ac0
Compare
e466195
into
flutter:flutter-3.27-candidate.0
This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
Issue Link:
Part of #156111
Changelog Description:
Updates the Android plugin templates to use newer configurations that have better compatibility with recent versions of AGP.
Impact Description:
Without this, plugins created by
flutter createwill have deprecation warnings out of the box for developers whose projects use new versions of AGP, and will eventually fail to compile without manual updates.Workaround:
Manually change the Java version after running
flutter createRisk:
What is the risk level of this cherry-pick?
Test Coverage:
Are you confident that your fix is well-tested by automated tests?
Validation Steps:
flutter create -t plugin some_plugin --platforms=androidThere should not be warnings about
source value 8 is obsoleteortarget value 8 is obsolete.