Skip to content
This repository was archived by the owner on Jun 20, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.0.0
35 changes: 35 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build

on:
pull_request:
push:
branches: [master]
workflow_dispatch:

jobs:
run-tests:
timeout-minutes: 15
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Install Bazel
run: tools/install_deps.sh

- name: Run tests
run: tools/run_tests.sh

- name: Set up Go
uses: actions/setup-go@v5

- name: Install buildifier
run: go install github.com/bazelbuild/buildtools/buildifier@latest

- name: Verify Starlark code formatting
run: buildifier -r path.
28 changes: 0 additions & 28 deletions .github/workflows/build.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/buildifier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Buildifier

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Run buildifier
run: bazelisk run //.github/workflows:buildifier.check
1 change: 1 addition & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
workspace(name = "io_bazel_rules_dart")

load("//dart/build_rules:repositories.bzl", "dart_repositories")

dart_repositories()
36 changes: 17 additions & 19 deletions dart/build_rules/core.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,31 @@

"""Dart rules shared across deployment platforms."""


load(":internal.bzl", "assert_third_party_licenses", "make_dart_context")


def _dart_library_impl(ctx):
"""Implements the dart_library() rule."""
assert_third_party_licenses(ctx)
"""Implements the dart_library() rule."""
assert_third_party_licenses(ctx)

dart_ctx = make_dart_context(ctx.label,
srcs=ctx.files.srcs,
data=ctx.files.data,
deps=ctx.attr.deps)

return struct(
dart=dart_ctx,
)
dart_ctx = make_dart_context(
ctx.label,
srcs = ctx.files.srcs,
data = ctx.files.data,
deps = ctx.attr.deps,
)

return struct(
dart = dart_ctx,
)

dart_library_attrs = {
"srcs": attr.label_list(allow_files=True, mandatory=True),
"data": attr.label_list(allow_files=True),
"deps": attr.label_list(providers=["dart"]),
"license_files": attr.label_list(allow_files=True)
"srcs": attr.label_list(allow_files = True, mandatory = True),
"data": attr.label_list(allow_files = True),
"deps": attr.label_list(providers = ["dart"]),
"license_files": attr.label_list(allow_files = True),
}


dart_library = rule(
implementation=_dart_library_impl,
attrs=dart_library_attrs,
implementation = _dart_library_impl,
attrs = dart_library_attrs,
)
Loading