-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Clean up null assumptions for Gradle classes #83443
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
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
7235bd0
to
d28fffe
Compare
@@ -190,7 +190,7 @@ class AndroidGradleBuilder implements AndroidBuilder { | |||
@required FlutterProject project, | |||
@required Set<AndroidBuildInfo> androidBuildInfo, | |||
@required String target, | |||
@required String outputDirectoryPath, | |||
String outputDirectoryPath, |
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.
Null outputDirectoryPath
defaults to project.android.buildDirectory
on line 197.
@@ -806,14 +807,13 @@ class AndroidGradleBuilder implements AndroidBuilder { | |||
/// Prints how to consume the AAR from a host app. | |||
void printHowToConsumeAar({ | |||
@required Set<String> buildModes, | |||
@required String androidPackage, | |||
String androidPackage = 'unknown', |
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.
It's possible to pass a nullable androidPackage
here. Since it's just used for informational printing, default to "unknown".
@required String line, | ||
@required FlutterProject project, | ||
@required bool usesAndroidX, | ||
@required bool shouldBuildPluginAsAar, |
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.
These are always passed in and assumed to be nonnull.
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.
LGTM
I started migrating
project.dart
and all its dependencies, and the diff was huge.Pull out the Gradle class cleanup parts that can be done without actually migrating to null safety.
Part of #71511