|
14 | 14 |
|
15 | 15 | """Dart rules shared across deployment platforms."""
|
16 | 16 |
|
17 |
| - |
18 | 17 | load(":internal.bzl", "assert_third_party_licenses", "make_dart_context")
|
19 | 18 |
|
20 |
| - |
21 | 19 | def _dart_library_impl(ctx):
|
22 |
| - """Implements the dart_library() rule.""" |
23 |
| - assert_third_party_licenses(ctx) |
| 20 | + """Implements the dart_library() rule.""" |
| 21 | + assert_third_party_licenses(ctx) |
24 | 22 |
|
25 |
| - dart_ctx = make_dart_context(ctx.label, |
26 |
| - srcs=ctx.files.srcs, |
27 |
| - data=ctx.files.data, |
28 |
| - deps=ctx.attr.deps) |
29 |
| - |
30 |
| - return struct( |
31 |
| - dart=dart_ctx, |
32 |
| - ) |
| 23 | + dart_ctx = make_dart_context( |
| 24 | + ctx.label, |
| 25 | + srcs = ctx.files.srcs, |
| 26 | + data = ctx.files.data, |
| 27 | + deps = ctx.attr.deps, |
| 28 | + ) |
33 | 29 |
|
| 30 | + return struct( |
| 31 | + dart = dart_ctx, |
| 32 | + ) |
34 | 33 |
|
35 | 34 | dart_library_attrs = {
|
36 |
| - "srcs": attr.label_list(allow_files=True, mandatory=True), |
37 |
| - "data": attr.label_list(allow_files=True), |
38 |
| - "deps": attr.label_list(providers=["dart"]), |
39 |
| - "license_files": attr.label_list(allow_files=True) |
| 35 | + "srcs": attr.label_list(allow_files = True, mandatory = True), |
| 36 | + "data": attr.label_list(allow_files = True), |
| 37 | + "deps": attr.label_list(providers = ["dart"]), |
| 38 | + "license_files": attr.label_list(allow_files = True), |
40 | 39 | }
|
41 | 40 |
|
42 |
| - |
43 | 41 | dart_library = rule(
|
44 |
| - implementation=_dart_library_impl, |
45 |
| - attrs=dart_library_attrs, |
| 42 | + implementation = _dart_library_impl, |
| 43 | + attrs = dart_library_attrs, |
46 | 44 | )
|
0 commit comments