这是indexloc提供的服务,不要输入任何密码
Skip to content

upgrade templates to use gradle dsl in android apps #154070

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

Closed
wants to merge 13 commits into from

Conversation

AbdeMohlbi
Copy link
Contributor

@AbdeMohlbi AbdeMohlbi commented Aug 25, 2024

towards #151166

Pre-launch Checklist

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

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

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. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 25, 2024
Copy link
Contributor

@nate-thegrate nate-thegrate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't have enough experience with .tmpl files to effectively review them.

I will say that the "++" title should be changed, since that's what the autosubmit bot will use to label the commit when it merges the PR.

Comment on lines 45 to 55
@override
Future<List<String>> getBuildVariants({required FlutterProject project}) async => const <String>[];
Future<List<String>> getBuildVariants(
{required FlutterProject project}) async =>
const <String>[];

@override
Future<String> outputsAppLinkSettings(
String buildVariant, {
required FlutterProject project,
}) async => '/';
}) async =>
'/';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These auto-formatter changes are unfortunately a readability downgrade from the original. We could either revert or replace with something better:

@override
  Future<List<String>> getBuildVariants({required FlutterProject project}) {
    return Future.value(const <String>[]);
  }

  @override
  Future<String> outputsAppLinkSettings(
    String buildVariant, {
    required FlutterProject project,
  }) {
    return Future.value('/');
  }

This comment was marked as off-topic.

Copy link
Contributor Author

@AbdeMohlbi AbdeMohlbi Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm getting Missing type annotation. now ?
i've changed it to this :

return Future<List<String>>.value(const <String>[]); 
return Future<String>.value('/');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nate-thegrate what do u think ?

@andrewkolos

This comment was marked as resolved.

@AbdeMohlbi

This comment was marked as outdated.

@AbdeMohlbi

This comment was marked as outdated.

@nate-thegrate

This comment was marked as resolved.

Co-authored-by: Nate Wilson <nathan.wilson1232@gmail.com>
@AbdeMohlbi AbdeMohlbi marked this pull request as draft August 26, 2024 18:22
@AbdeMohlbi

This comment was marked as off-topic.

@AbdeMohlbi AbdeMohlbi changed the title ++ upgrade templates to use gradle dsl in android apps Aug 26, 2024
@nate-thegrate

This comment was marked as off-topic.

@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@AbdeMohlbi
Copy link
Contributor Author

@bartekpacia i guess this could help for now , not sure about the other tests tho

@bartekpacia
Copy link
Member

bartekpacia commented Aug 26, 2024

I don't understand why you're duplicating the same work I'm doing in #154061

i guess this could help for now

help with what?

@nate-thegrate
Copy link
Contributor

I hadn't noticed till now, but based on the help_with_154061 branch name, it's clear that the goal of this PR is to try to help @bartekpacia with the efforts being made in #154061.

Setting the target branch as bartekpacia:gradle_kotlin_by_default would have been more pertinent than flutter:master. Even then, this is not something I would recommend, per Brooks's Law:

What one programmer can do in one month, two programmers can do in two months.


I'm going to close this one. In the future, my recommendation would be to avoid work that overlaps with another person's contribution—I've learned the hard way that even with good intentions, things can still break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants