Skip to content
This repository was archived by the owner on Jun 20, 2025. It is now read-only.
Open
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
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ on:
branches: [master]

jobs:
buildifier:
name: Buildifier
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run Buildifier checks
uses: thompsonja/bazel-buildifier@v0.4.0
with:
warnings: all

run-tests:
timeout-minutes: 15
strategy:
Expand Down
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