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

Declare tasks programatically rather than declaratively #12

Merged
merged 3 commits into from
Jul 29, 2019
Merged

Conversation

nex3
Copy link
Collaborator

@nex3 nex3 commented Jul 25, 2019

This has a few benefits:

This has a few benefits:

* It allows us to dynamically choose task dependencies (so for example
  the Linux standalone package can depend on the native executable
  task when running on Linux).

* Similar tasks can be defined programmatically.

* Task names are decoupled from Dart function names, which in turn
  allows us to avoid manually namespacing the package in favor of
  encouraging it to be imported with a Dart namespace.

* It works around google/grinder.dart#337 and google/grinder.dart#338.
@nex3 nex3 requested a review from srawlins July 25, 2019 23:21
doc/standalone.md Show resolved Hide resolved
lib/src/standalone.dart Outdated Show resolved Hide resolved
}

/// Returns the architecture name for the given boolean.
String _arch(bool x64) => x64 ? "x64" : "ia32";
Copy link
Contributor

Choose a reason for hiding this comment

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

binary extension might be another good helper here. os == 'windows' ? '.exe' : '' appears three times in this file, and all three are in string interpolations. :/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@nex3 nex3 merged commit cf2c73f into master Jul 29, 2019
@nex3 nex3 deleted the dynamic-tasks branch July 29, 2019 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants