Skip to content

Commit

Permalink
🔖 release chopper_generator v6.0.2 (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed Jun 19, 2023
1 parent ae73e23 commit b19f402
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions chopper_generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 6.0.2

- Add support for generating files in different directories ([#444](https://github.com/lejard-h/chopper/pull/444))

## 6.0.1

- Packages upgrade, constraints upgrade
Expand Down
2 changes: 1 addition & 1 deletion chopper_generator/lib/chopper_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import 'package:build/build.dart';
import 'src/generator.dart';

Builder chopperGeneratorFactory(BuilderOptions options) =>
chopperGeneratorFactoryBuilder(header: options.config['header']);
chopperGeneratorFactoryBuilder(options);
13 changes: 11 additions & 2 deletions chopper_generator/lib/src/generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -634,10 +634,19 @@ class ChopperGenerator extends GeneratorForAnnotation<chopper.ChopperApi> {
}
}

Builder chopperGeneratorFactoryBuilder({String? header}) => PartBuilder(
Builder chopperGeneratorFactoryBuilder(BuilderOptions options) => PartBuilder(
[ChopperGenerator()],
'.chopper.dart',
header: header,
header: options.config['header'],
formatOutput:
PartBuilder([ChopperGenerator()], '.chopper.dart').formatOutput,
options: !options.config.containsKey('build_extensions')
? options.overrideWith(
BuilderOptions({
'build_extensions': {'.dart': '.chopper.dart'},
}),
)
: options,
);

bool getMethodOptionalBody(ConstantReader method) =>
Expand Down
2 changes: 1 addition & 1 deletion chopper_generator/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: chopper_generator
description: Chopper is an http client generator using source_gen, inspired by Retrofit
version: 6.0.1
version: 6.0.2
documentation: https://hadrien-lejard.gitbook.io/chopper
repository: https://github.com/lejard-h/chopper

Expand Down

0 comments on commit b19f402

Please sign in to comment.