build_daemon 0.0.1

  • Example
  • Installing
  • Versions
  • new44

This package provides support for running builds in a daemon.


  • Initial Build Daemon support.


// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:io';
import 'dart:math';

import 'package:build_daemon/client.dart';

void main(List<String> args) async {
  BuildDaemonClient client;
  var workingDirectory = Directory.current.path;
  try {
    client = await BuildDaemonClient.connect(workingDirectory);
  } on VersionSkew {
    print('Version skew. Please disconnect all other clients '
        'before trying to start a new one.');
  if (client == null) throw Exception('Error connecting');
  print('Connected to Dart Build Daemon');
  if (Random().nextBool()) {
    client.registerBuildTarget('/some/client/path', [r'.*_test\.dart$']);
    print('Registered example client target...');
  } else {
    client.registerBuildTarget('/some/test/path', []);
    print('Registered test target...');
  client.buildResults.listen((status) => print('BUILD STATUS: $status'));
  await client.finished;

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  build_daemon: ^0.0.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:build_daemon/client.dart';
import 'package:build_daemon/constants.dart';
import 'package:build_daemon/daemon_builder.dart';
import 'package:build_daemon/data/build_options_request.dart';
import 'package:build_daemon/data/build_options_request.g.dart';
import 'package:build_daemon/data/build_request.dart';
import 'package:build_daemon/data/build_request.g.dart';
import 'package:build_daemon/data/build_status.dart';
import 'package:build_daemon/data/build_status.g.dart';
import 'package:build_daemon/data/build_target_request.dart';
import 'package:build_daemon/data/build_target_request.g.dart';
import 'package:build_daemon/data/log_to_paths_request.dart';
import 'package:build_daemon/data/log_to_paths_request.g.dart';
import 'package:build_daemon/data/serializers.dart';
import 'package:build_daemon/data/serializers.g.dart';
import 'package:build_daemon/data/server_log.dart';
import 'package:build_daemon/data/server_log.g.dart';
Version Uploaded Documentation Archive
0.0.1 Jan 7, 2019 Go to the documentation of build_daemon 0.0.1 Download build_daemon 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.10


Detected platforms: Flutter, other

Platform components identified in package: io, isolate.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
built_collection ^4.1.0 4.1.0
built_value ^6.2.0 6.2.0
package_resolver ^1.0.6 1.0.6
pedantic ^1.0.0 1.4.0
pool ^1.3.6 1.4.0
shelf ^0.7.4 0.7.4
shelf_web_socket ^0.2.2+4 0.2.2+4
stream_transform ^0.0.14+1 0.0.14+1
watcher ^0.9.7 0.9.7+10
web_socket_channel ^1.0.9 1.0.9
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
fixnum 0.10.9
http 0.12.0+1
http_parser 3.1.3
matcher 0.12.4
meta 1.1.7
package_config 1.0.5
path 1.6.2
quiver 2.0.1
source_span 1.5.1
stack_trace 1.9.3
stream_channel 1.6.8
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
build_runner ^1.0.0
built_value_generator ^6.2.0
mockito ^4.0.0
test ^1.3.3
test_descriptor ^1.1.1
uuid ^1.0.3