Skip to content

Fixes #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 20, 2017
Merged
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
3 changes: 1 addition & 2 deletions example/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

library source_gen.example.example;

import 'package:source_gen/generators/json_serializable.dart';
import 'package:source_gen/generators/json_literal.dart';
import 'package:json_serializable/annotations.dart';

part 'example.g.dart';

Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ environment:
dependencies:
analyzer: '>=0.29.10 <0.31.0'
build: ^0.9.0
cli_util: ^0.1.0
path: ^1.3.2
source_gen: ^0.6.1+1
dev_dependencies:
build_runner: ^0.3.2
build_test: ^0.6.0
collection: ^1.14.0
test: ^0.12.3
2 changes: 1 addition & 1 deletion test/analysis_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import 'package:path/path.dart' as p;
Future<AnalysisContext> getAnalysisContextForProjectPath(
String projectPath, List<String> foundFiles) async {
// TODO: fail more clearly if this...fails
var sdkPath = cli.getSdkDir().path;
var sdkPath = cli.getSdkPath();

var resourceProvider = PhysicalResourceProvider.INSTANCE;
DartSdk sdk = new FolderBasedDartSdk(
Expand Down
2 changes: 1 addition & 1 deletion test/test_files/json_test_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ library source_gen.test.example;
import 'dart:collection';

import 'package:collection/collection.dart';
import 'package:source_gen/generators/json_serializable.dart';
import 'package:json_serializable/annotations.dart';

part 'json_test_example.g.dart';

Expand Down
10 changes: 4 additions & 6 deletions tool/phases.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
// BSD-style license that can be found in the LICENSE file.

import 'package:build_runner/build_runner.dart';

import 'package:source_gen/generators/json_literal_generator.dart' as literal;
import 'package:source_gen/generators/json_serializable_generator.dart' as json;
import 'package:json_serializable/json_serializable.dart';
import 'package:source_gen/source_gen.dart';

final PhaseGroup phases = new PhaseGroup.singleAction(
new GeneratorBuilder(const [
const json.JsonSerializableGenerator(),
const literal.JsonLiteralGenerator()
const JsonSerializableGenerator(),
const JsonLiteralGenerator()
]),
new InputSet('source_gen',
new InputSet('json_serializable',
const ['example/*.dart', 'test/test_files/json_test_example.dart']));