Skip to content

Commit 2d61ba1

Browse files
authored
source_gen custom header – for copyright (#59)
1 parent aecefaf commit 2d61ba1

File tree

7 files changed

+36
-8
lines changed

7 files changed

+36
-8
lines changed

json_serializable/example/example.g.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
15
// GENERATED CODE - DO NOT MODIFY BY HAND
26

37
part of json_serializable.example;

json_serializable/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
# `json_annotation`. Properly constrains all features it provides.
1515
json_annotation: '>=0.2.0 <0.2.1'
1616
path: ^1.3.2
17-
source_gen: ^0.7.0
17+
source_gen: ^0.7.1
1818
dev_dependencies:
1919
build_runner: '>=0.4.0 <0.6.0'
2020
build_test: '>=0.6.0 <0.9.0'

json_serializable/test/test_files/bathtub.g.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
15
// GENERATED CODE - DO NOT MODIFY BY HAND
26

37
part of json_serializable.test.bathtub;

json_serializable/test/test_files/json_literal.g.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
15
// GENERATED CODE - DO NOT MODIFY BY HAND
26

37
part of json_serializable.example;

json_serializable/test/test_files/json_test_example.g.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
15
// GENERATED CODE - DO NOT MODIFY BY HAND
26

37
part of json_serializable.test.example;

json_serializable/test/test_files/kitchen_sink.g.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
15
// GENERATED CODE - DO NOT MODIFY BY HAND
26

37
part of json_serializable.test.kitche_sink;
Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
1+
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

@@ -8,10 +8,18 @@ import 'package:source_gen/source_gen.dart';
88

99
final List<BuildAction> buildActions = [
1010
new BuildAction(
11-
new PartBuilder(const [
12-
const JsonSerializableGenerator(),
13-
const JsonLiteralGenerator()
14-
]),
15-
'json_serializable',
16-
inputs: const ['example/*.dart', 'test/test_files/*.dart'])
11+
new PartBuilder(
12+
const [const JsonSerializableGenerator(), const JsonLiteralGenerator()],
13+
header: _copyrightHeader),
14+
'json_serializable',
15+
inputs: const ['example/*.dart', 'test/test_files/*.dart'],
16+
)
1717
];
18+
19+
final _copyrightHeader =
20+
'''// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
21+
// for details. All rights reserved. Use of this source code is governed by a
22+
// BSD-style license that can be found in the LICENSE file.
23+
24+
$defaultFileHeader
25+
''';

0 commit comments

Comments
 (0)