build_suite — extended multi-file DCli sample

> Attribution. The tom_d4rt project is an extended clone of the original > d4rt project by Moustapha Kodjo Amadou, initially published in 2025. The > complete interpreter is based on his idea.

A miniature build/automation tool, written as a multi-file D4rt CLI script. It is the command-line analog of the Flutter "extended sample" apps: a real multi-file program with classes and functions split across files, driven by the DCli shell and filesystem bridges, and wireable into a BuildKit pipeline.

The suite never touches the surrounding workspace — every run builds a throw-away Dart project inside a temp directory (createTempDir) and discards it on exit.

Files

FileRole
main.dart Entry point — argument parsing + target dispatch
tasks.dart BuildTask hierarchy ( EnvCheck , Clean , Generate , Analyze , Package ) + TaskRunner
logger.dart BuildLogger — coloured, step-numbered output via the DCli colour bridges
buildkit.yaml BuildKit pipelines (ci, quick) that drive the script

What it exercises

  • Cross-file classes & functions — an abstract BuildTask base with

concrete subclasses in tasks.dart, a BuildLogger in logger.dart, all composed from main.dart via relative imports. - Shell bridgeswhich('dart'), 'dart --version'.firstLine. - Filesystem bridgescreateDir, find, read, exists, deleteDir, createTempDir, and the String.write path extension. - Colour outputcyan, green, yellow, red, grey from DCli. - BuildKit integrationbuildkit.yaml runs the script as pipeline steps.

Running

# Default target is "all": env-check → clean → generate → analyze → package
dcli main.dart

# Individual targets
dcli main.dart clean
dcli main.dart generate
dcli main.dart analyze
dcli main.dart all

# Plain Dart works too (it is ordinary Dart source)
dart run main.dart analyze

Targets and the tasks they run are defined by tasksForTarget in tasks.dart.

Via BuildKit

bk :pipeline ci      # clean → analyze → all
bk :pipeline quick   # analyze only

See the DCli scripting guide, Appendix C (BuildKit Integration) for the pipeline contract.