Skip to content

Commit 54349e7

Browse files
committed
Removed dep on package meta.
1 parent 931ea67 commit 54349e7

File tree

7 files changed

+42
-56
lines changed

7 files changed

+42
-56
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.6
2+
* Updated dependencies.
3+
* Removed dependency on package `meta`.
4+
15
## 0.2.5
26

37
* Updated examples and docs.

lib/merging_builder.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/// Library providing the builders [MergingBuilder] and [StandaloneBuilder].
2-
/// * Note: The builders use synthetic input.
3-
41
export 'src/builders/merging_builder.dart';
52
export 'src/generators/merging_generator.dart';
63
export 'src/builders/standalone_builder.dart';

lib/src/builders/merging_builder.dart

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import 'dart:async';
2+
23
import 'package:build/build.dart';
34
import 'package:exception_templates/exception_templates.dart';
45
import 'package:glob/glob.dart';
56
import 'package:path/path.dart' as path show equals;
67
import 'package:source_gen/source_gen.dart' show LibraryReader;
78

89
import '../generators/merging_generator.dart';
9-
import 'formatter.dart';
1010
import 'synthetic_builder.dart';
1111
import 'synthetic_input.dart';
1212

@@ -33,19 +33,14 @@ class MergingBuilder<T, S extends SyntheticInput> extends SyntheticBuilder<S> {
3333
/// source code contains invalid syntax. To temporarily suppress formatting
3434
/// use: `(String input) => input`.
3535
MergingBuilder({
36-
String inputFiles = 'lib/*.dart',
36+
super.inputFiles = 'lib/*.dart',
3737
this.outputFile = 'lib/merged_output.dart',
3838
required this.generator,
39-
String header = '',
40-
String footer = '',
39+
super.header,
40+
super.footer,
4141
this.sortAssets = false,
42-
Formatter? formatter,
43-
}) : super(
44-
inputFiles: inputFiles,
45-
header: header,
46-
footer: footer,
47-
formatter: formatter,
48-
);
42+
super.formatter,
43+
});
4944

5045
/// Path to output file relative to the package root directory.
5146
/// Example: `lib/merged_output.dart`

lib/src/builders/standalone_builder.dart

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'dart:async';
2+
23
import 'package:build/build.dart';
34
import 'package:exception_templates/exception_templates.dart';
45
import 'package:file/local.dart';
@@ -7,9 +8,8 @@ import 'package:lazy_memo/lazy_memo.dart';
78
import 'package:path/path.dart' as path;
89
import 'package:source_gen/source_gen.dart' show Generator, LibraryReader;
910

10-
import 'formatter.dart';
11-
import 'synthetic_input.dart';
1211
import 'synthetic_builder.dart';
12+
import 'synthetic_input.dart';
1313

1414
/// Builder that uses synthetic input and
1515
/// creates one output file for each input file.
@@ -37,19 +37,14 @@ class StandaloneBuilder<S extends SyntheticInput> extends SyntheticBuilder<S> {
3737
/// To disable formatting one may pass a closure returning the
3838
/// input: `(input) => input` as argument for `formatter`.
3939
StandaloneBuilder({
40-
String inputFiles = 'lib/*.dart',
40+
super.inputFiles = 'lib/*.dart',
4141
this.outputFiles = 'lib/standalone_(*).dart',
4242
required this.generator,
43-
String header = '',
44-
String footer = '',
45-
Formatter? formatter,
43+
super.header,
44+
super.footer,
45+
super.formatter,
4646
String root = '',
47-
}) : root = root.trim(),
48-
super(
49-
inputFiles: inputFiles,
50-
header: header,
51-
footer: footer,
52-
formatter: formatter) {
47+
}) : root = root.trim() {
5348
_resolvedOutputFiles = Lazy(_outputPaths);
5449
}
5550

lib/src/builders/synthetic_input.dart

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import 'package:exception_templates/exception_templates.dart';
2-
import 'package:meta/meta.dart';
32

43
/// Base class representing synthetic builder input.
54
/// For more information about synthetic input see:
65
/// [Writing an Aggregate Builder](https://github.com/dart-lang/build/blob/master/docs/writing_an_aggregate_builder.md#writing-the-builder-using-a-synthetic-input).
7-
abstract class SyntheticInput {
6+
sealed class SyntheticInput {
87
const SyntheticInput._(this.value);
98

109
/// String value.
@@ -52,9 +51,8 @@ abstract class SyntheticInput {
5251
/// Synthetic input representing files under the `lib` directory.
5352
/// For more information about synthetic input see:
5453
/// [Writing an Aggregate Builder](https://github.com/dart-lang/build/blob/master/docs/writing_an_aggregate_builder.md#writing-the-builder-using-a-synthetic-input).
55-
@sealed
56-
class LibDir extends SyntheticInput {
57-
const LibDir._(String value) : super._(value);
54+
final class LibDir extends SyntheticInput {
55+
const LibDir._(super.value) : super._();
5856

5957
static LibDir? _instance;
6058

@@ -69,9 +67,8 @@ class LibDir extends SyntheticInput {
6967
/// Synthetic input representing files under the `root` directory.
7068
/// For more information about synthetic input see:
7169
/// [Writing an Aggregate Builder](https://github.com/dart-lang/build/blob/master/docs/writing_an_aggregate_builder.md#writing-the-builder-using-a-synthetic-input).
72-
@sealed
73-
class PackageDir extends SyntheticInput {
74-
const PackageDir._(String value) : super._(value);
70+
final class PackageDir extends SyntheticInput {
71+
const PackageDir._(super.value) : super._();
7572

7673
static PackageDir? _instance;
7774

pubspec.yaml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,33 @@ description: MergingBuilder reads several input files and writes merged output
44
to one file. StandaloneBuilder enables output to a custom folder with custom
55
output file name.
66

7-
version: 0.2.5
7+
version: 0.2.6
88

99
homepage: https://github.com/simphotonics/merging_builder
1010

1111
environment:
12-
sdk: '>=2.17.0 <3.0.0'
12+
sdk: '^3.0.0'
1313

1414
dependencies:
15-
analyzer: ^5.4.0
16-
build: ^2.3.1
17-
build_runner: ^2.3.3
18-
dart_style: ^2.2.4
19-
directed_graph: ^0.3.7
20-
exception_templates: ^0.2.1
21-
file: ^6.1.4
22-
glob: ^2.1.1
23-
lazy_memo: ^0.1.2
24-
meta: ^1.8.0
25-
path: ^1.8.3
26-
quote_buffer: ^0.2.3
27-
source_gen: ^1.2.6
15+
analyzer: ^6.4.1
16+
build: ^2.4.1
17+
build_runner: ^2.4.9
18+
dart_style: ^2.3.6
19+
directed_graph: ^0.4.1
20+
exception_templates: ^0.3.0
21+
file: ^7.0.0
22+
glob: ^2.1.2
23+
lazy_memo: ^0.2.2
24+
path: ^1.9.0
25+
quote_buffer: ^0.2.5
26+
source_gen: ^1.5.0
2827
dependency_overrides: null
2928
# source_gen:
3029
# git:
3130
# url: [email protected]:dart-lang/source_gen.git
3231
# ref: master
3332
# path: source_gen
3433
dev_dependencies:
35-
build_test: ^2.1.5
36-
crypto: ^3.0.2
37-
lints: ^2.0.1
38-
test: ^1.22.1
34+
build_test: ^2.2.2
35+
lints: ^3.0.0
36+
test: ^1.25.2

test/build_extensions_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import 'package:build/src/builder/build_step.dart';
2-
import 'package:analyzer/dart/element/element.dart';
3-
import 'package:exception_templates/exception_templates.dart';
41
import 'dart:async';
52

3+
import 'package:analyzer/dart/element/element.dart';
4+
import 'package:build/src/builder/build_step.dart';
5+
import 'package:exception_templates/exception_templates.dart';
66
import 'package:merging_builder/merging_builder.dart';
77
import 'package:source_gen/src/constants/reader.dart';
88
import 'package:test/test.dart';

0 commit comments

Comments
 (0)