kevmoo / rules_dart

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dart rules

WARNING These are in active development and are not production-ready. Expect frequent breaking changes.

Rules

  • dart_library
  • dart_vm_binary
  • dart_vm_snapshot
  • dart_vm_test
  • dart_web_application
  • dart_web_test

Overview

These build rules are used for building Dart projects with Bazel.

Setup

To use the Dart rules, add the following to your WORKSPACE file to add the external repositories for the Dart toolchain:

git_repository(
    name = "io_bazel_rules_dart",
    remote = "https://github.com/rules_dart/rules_dart.git",
    tag = "0.0.1-alpha+1",
)
load("@io_bazel_rules_dart//dart:repositories.bzl", "dart_repositories")

dart_repositories()

Roadmap

  • TODO

Core rules

dart_library: Declares a collection of Dart sources and data and their dependencies.

VM rules

dart_vm_binary: Builds an executable bundle that runs a script or snapshot on the Dart VM.

dart_vm_snapshot: Builds a VM snapshot of a Dart script. WARNING Snapshot files are not guaranteed to be compatible across VM releases.

dart_vm_test: Builds a test that will be executed on the Dart VM.

Web rules

dart_web_application: Compiles the specified script to JavaScript.

dart_web_test: Builds a test that will be executed in the browser.

About

License:Apache License 2.0


Languages

Language:Python 77.0%Language:Dart 18.0%Language:Shell 5.0%