p-hatan/ mirror

pub repository

mirror.p-hatan.com

grinder

0.6.5

Grinder - a task based, dependency aware build system.

Download archive

Readme

Grinder for Dart

A task based, dependency aware build system.

Build Status Coverage Status

Intro

Grinder is a library and tool to drive a command-line build.

Build files are entirely specified in Dart code. This allows you to write and debug your build files with the same tools you use for the rest of your project source.

Getting Started

The build file for your application should reside at tool/grind.dart. A typical Grinder build file may look something like this:

void main([List<String> args]) {
  task('init', init);
  task('compile', compile, ['init']);
  task('deploy', deploy, ['compile']);
  task('docs', deploy, ['init']);
  task('all', null, ['deploy', 'docs']);

  startGrinder(args);
}

init(GrinderContext context) {
  context.log("I set things up");
}

...

Tasks to run are specified on the command line. If a task has dependencies, those dependent tasks are run before the specified task.

Installing

To install, run:

pub global activate grinder

Command-line usage

usage: dart grind.dart <options> target1 target2 ...

valid options:
-h, --help    show targets but don't build
-d, --deps    display the dependencies of targets

or:

pub run grind <args>

will run the tool/grind.dart script with the supplied arguments.

API documentation

Documentation is available here.

Disclaimer

This is not an official Google product.

Changelog

grinder.dart changes

0.6.5 (2015/1/13)

  • added defaultInit() and defaultClean() methods, for common tasks
  • added methods for Pub.global.activate and Pub.global.run
  • added an optional workingDirectory argument to more methods
  • added a --version command line flag
  • have the version command check to see if there's a newer version of grinder available
  • the dart2js compile tasks now create the output directory if it doesn't exist

0.6.4 (2014/12/18)

  • clarify that users should put their build scripts in tools/grind.dart
  • add a getSdkDir method

0.6.2 (2014/11/13)

  • widen the version constraint on quiver

0.6.1 (2014/10/12)

  • widen the version constraint on args

0.6.0 (2014/09/22)

The convenience API is now more terse:

  • the defineTask() method has been renamed to task()
  • instead of named parameters, the task() function now uses optional positional parameters

Added two new entrypoint files in bin/: grind.dart and grinder.dart. These let you run grinder via:

pub run grinder test

They look for a corresponding grinder script in the tool directory (bin/grind.dart looks for tool/grind.dart and bin/grinder.dart looks for tool/grinder.dart). If they find a corresponding script they run it in a new Dart VM process. This means that projects will no longer have to have a grind.sh script in the root of each project.

PubTool's build methods now take an optional workingDirectory argument.

Removed runSdkBinary and runSdkBinaryAsync, and they are no longer needed. Use runProcess and runProcessAsync instead.

The methods on PubTools and Dart2jsTools are now static - you no longer need to create an instance to use them. Also, PubTools was renamed to Pub and Dart2jsTools was renamed to Dart2js. And a new utility class for dartanalyzer - Analyzer - was created.

0.5.7 (2014/07/28)

  • added runProcessAsync() and related async methods (such as PubTools.buildAsync(...))
  • removed duplicated stack traces when the build fails with exceptions
  • throw an exception when running SDK binaries, and we are not able to locate the Dart SDK

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add grinder
pubspec.yaml
name: grinder
# This version must be updated in tandem with the lib/grinder.dart version.
version: 0.6.5
description: Grinder - a task based, dependency aware build system.

homepage: https://github.com/google/grinder.dart
author: Devon Carew <devoncarew@google.com>

environment:
  sdk: '>=1.0.0 <2.0.0'

dependencies:
  args: '>=0.10.0 <0.13.0'
  quiver: '>=0.18.0 <0.21.0'

dev_dependencies:
  unittest: any

executables:
  grind:
  grinder:

Version history

VersionPublishedArchiveSHA-256
0.0.42013-09-24T19:26:22.204200ZDownload9de8fb40e881b3286060ad571473989081cac3a20ba120db20a56c8998df8a9a
0.0.52013-10-01T16:33:18.998120ZDownload11a861daff014f235c41c7282eec2ee00a512b7d0c2f21b7ba8ec398d4414220
0.0.62013-10-09T06:40:42.005520ZDownload026d1bda256f40090ecaf3d131c92d54d5721bd332fec934746b9d1b92dc1cf7
0.0.72013-10-18T19:28:16.196750ZDownload9aeeb1a656d5ef5c5ce57072e1dc805bc21ff25a236ca2ac0cf42bb04d62e0c8
0.1.02013-10-30T14:15:55.348910ZDownload8dcdf8a3a828b9c841eeb7a10e1fd26303f51513ed2eeb57d99a8fca5b41c1b0
0.4.02013-11-11T06:01:39.504670ZDownload0506fa5a51713181c1851a352f6e10cb3627264d8062b818c538ed790fc1cac6
0.4.12013-11-25T20:10:48.730700ZDownloaddec7495160883c9ee784beafb2abb51a858675dc572c0d5c654fca362dbbd082
0.4.22013-11-26T00:34:12.674500ZDownloade0c8fde40af33e0391eb16ad5fd2546184eec83f1eea3e7169b4a0884587f92b
0.4.32013-11-27T15:26:08.363550ZDownload2bd14dd86f92ac02b7c1a493e0b35925fc690829f6a288527bbefdde0c9d849d
0.4.42013-12-10T16:49:54.210090ZDownload977e9974c73d498173bca31387dc8f63d810815c916e3237e14748ca548e8cfb
0.4.52013-12-21T18:13:09.517720ZDownloadfec4fa7afdd6424f567f622550ab9b44dcadf0cfde3e369c2bd6932a792702a1
0.5.02014-01-03T20:33:48.479220ZDownload4e9e52c669974e74c98097fdc8711942b992e873391397a5539a728f90c17619
0.5.12014-01-06T18:09:33.897210ZDownloadfde18f3e7e41b3cdb6e4ec6ba4e02733116ba8cfe4fd7482fc13e540f9b872ce
0.5.22014-04-11T22:01:23.705470ZDownload86b75995e5bf2f4e281b00e6826d427757e5e7b47358b48eea4c468b2f9a215a
0.5.32014-05-22T02:16:07.606240ZDownload8063a3663120a90b77792c7f53a04b3017c220610253d9c088b35035fd934348
0.5.42014-05-23T16:47:32.201730ZDownload2a06c90a9a5a1fccae8c421b4559fcca49b694ecdabb3f5d16a56578b8bb06cc
0.5.62014-07-21T09:30:57.961760ZDownload0409881bf126a10818398a9324fe694718fbfb58eb2b4ddf58bf56cccd3bf2e5
0.5.72014-07-29T06:13:54.555200ZDownload297ac83346613371c115f6fa203d6829953551e703fa7ce13183b737411b9fe9
0.6.02014-09-24T03:12:12.333780ZDownload2f3b345b6c5d203c4fb69c989327294539244c50178e2c8c7d2228a0e101dc58
0.6.12014-10-13T06:54:28.649820ZDownload8e7d702dcef50c642444152f07e0a88fabf358471f1658983654d1b07a9ed5fa
0.6.22014-11-13T19:44:52.284420ZDownload56df31701401eb8f854dc8fa5399a99a1988f7d035dcc9b0819e52ae0994ce90
0.6.32014-12-11T17:26:01.406320ZDownload10a4a0dbeae1fd9ba56fdce4606a9a74d31f42678b973ba580d3fc2707461924
0.6.42014-12-18T23:00:56.472410ZDownloade1c3f8ee0a3cc2c6e22468bfab4257677692bedc37c6d3dd3e2a343ad8293705
0.6.4+12014-12-23T19:18:28.453600ZDownload80d71af01dce6aadc7dedc19e361b65b1d8a9c3cfc32d37812eb01e920e4af3d
0.6.52015-01-14T02:03:03.278370ZDownloadd45160a8e7bbf238b7bb4d236c83fea5ade66cea517f47023ee96e63649faba7
0.6.62015-01-29T20:09:35.061460ZDownload94bcfcbeedfe3cffdc04bbd7af32f80233f3733bf52c8c56c3fc36e106d34385
0.6.6+12015-01-31T02:08:26.867600ZDownload1408c2e0616ec53a5391766483e64858fc26ec14e357410c701c78fa93d5dfc8
0.6.6+22015-01-31T02:22:50.159420ZDownload40a33d3a8dba09ed0462af7b1c3acd512ad89d07827676cff663b1edc26a638e
0.6.6+32015-02-05T23:53:48.663120ZDownload29081f9c3fcf90b74ed5016b409105e85efe819a2914512431f8a535b7daf0bf
0.7.0-dev.12015-03-29T01:58:20.731920ZDownload66e4961ad1743c708f70c2c5a3f7fcf2e6bbf6e5337c9eb5fbbabbe3f297767c
0.7.0-dev.22015-04-10T23:41:10.965890ZDownloadd1ef1ac62089b1b5cf9575af41f324ed548b1ea715220b15bd50c527fff588ac
0.7.02015-04-21T14:37:53.523970ZDownload0ed2a62548fd25e99c551a01848c3d76448d309a0ad03467c55a72a5bf8569f6
0.7.12015-05-19T22:54:41.103070ZDownload517a659ed6ac3da529ccfe857fbabf9c51e41e1bb5c8c0b839063c7161147a66
0.7.1+12015-05-20T13:25:20.556240ZDownload2f2363a4c68a92df23a56daaace719d3d4530d4f11baa2801bcb027a40657a72
0.7.1+22015-05-24T18:27:09.788ZDownload48203ae87b6bba802520bbd9e73332e6add92689b632fc69d2e2722f97d619bb
0.7.1+32015-05-24T21:31:17.303ZDownload35450802cfeffbbf8a27a71281de98b45ba5176ebb997a877920c98bf34ba96c
0.7.22015-07-09T02:07:05.133ZDownload4fa504d5b0fefd2e82a402d2626f329a8ccbe6b47097b609b2967037a766229e
0.8.0-dev.12015-10-26T16:48:09.867ZDownload704fe8b8c721c274de45f727b312f1cde40b9fad11c845f2a3b4324bd35db868
0.8.0-dev.22015-10-29T13:17:58.292ZDownload91bb8f197a606113f10e94495d4d80ebe1336bd259a9660e053dfaeb739ad2fc
0.8.02015-10-29T14:09:31.998ZDownloadb12b054bc5792d5a44feedd7fb85d6190183d99c1e5f0546f17f8f1d8d4a03e5
0.8.0+12015-11-13T07:59:35.321ZDownload7714a971da2483b2e30526b200280179212919f767b2dedcef62879bc900fbfc
0.8.0+22016-01-27T00:45:44.773ZDownload9b65c1fd680a23cc6b86a25dcbfae44a80781deba37897aaa392295880ee9c0f
0.8.0+32016-10-16T09:24:29.061ZDownload5dc15642a03e26cdef83467587ff6cbdcd4aa457ab9f203ba26cf722d395cadf
0.8.12017-12-19T02:03:53.397955ZDownload5b0b44252ed8a7b6ec7ee79c3877078ffac42f7c4ab65d041eb0bd2caee84f1d
0.8.22018-05-10T10:17:52.516341ZDownload6636532c45eadabd20f3390d3801613d4a26afe6c150e05c5227b89d28bf91f7
0.8.32018-07-20T00:22:45.062783ZDownload8284e19b321e2ea157d43d3151ca712d62c10bf2fce2e8042499c90483b13f0d
0.8.3+12019-07-21T22:47:23.080630ZDownload9653d450012e31fe41edc6a0fd7beed254c8b9de7e298d0f2fd92b2c0e29d19f
0.8.42020-03-18T21:07:23.466885ZDownloadfdc35bbe1c903e0a34b918329eb49aaadf40f7b324cbeb600bca360efc318f2a
0.8.52020-06-09T18:25:50.083602ZDownload7fd2bed35260317ce91eaada2f229526759d789134782b471fe4d60d1a442c9b
0.8.62020-10-13T21:53:31.319869ZDownload29e927659629265ae2c512841f4c130ca314fe010b32904ab4340fc9ebcb37f1
0.9.0-nullsafety.02021-01-17T01:10:10.140942ZDownloadd6ddb4d11a96ec905f6c243f921e257861cb406ebfc549b83bff43b2e88c8bfa
0.9.02021-03-18T20:38:01.718841ZDownload2961d5bf164ad2b91e0a0259f04ee5a625f4a4bf0c9f294a0503eb98e5cf0fb9
0.9.12022-04-04T19:06:54.807913ZDownload2e8c01865aecf9ca1df55973f12bf0455a6a6ceb23867cd3277a803a4060fb19
0.9.22022-06-22T04:05:33.785923ZDownloadb24948a441fc65d07bc8b219d7ee8d6cc0af4cdb13823e0d3be6d848eb787b04
0.9.32023-02-06T16:37:29.469679ZDownload1dabcd70f0d3975f9143d0cebf48a09cf56d4f5e0922f1d1931781e1047c8d00
0.9.42023-04-27T16:03:41.502429ZDownload48495acdb3df702c55c952c6536faf11631b8401a292eb0d182ef332fc568b56
0.9.52023-11-09T23:02:11.294655ZDownloade1996e485d2b56bb164a8585679758d488fbf567273f51c432c8733fee1f6188
0.10.02026-07-01T21:26:49.695381ZDownload8c65fc6c0c0748c2d9080c1fb603d7a9640bf5a5eda29f35099bd351cc45093f
0.10.12026-09-03T00:13:15.873220ZDownload7e0969c3e1e4fcc2a24385457df52626adf0efcba72a43209f72b986a79dc8f3
0.10.22026-10-21T19:48:17.933603ZDownloadf8cf4d64aa7b71460ea6b0a2a288b83b40a74be93849d140579cd96db86d644a

Dependencies

args "\u003e=0.10.0 \u003c0.13.0"

quiver "\u003e=0.18.0 \u003c0.21.0"