2025-05-18 15:43:02 +03:00
|
|
|
//
|
|
|
|
|
// Copyright 2021 Sergey Penkovsky (sergey.penkovsky@gmail.com)
|
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
|
// You may obtain a copy of the License at
|
2025-08-08 23:24:05 +03:00
|
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
2025-05-18 15:43:02 +03:00
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
|
// limitations under the License.
|
|
|
|
|
//
|
docs(generator): improve and unify English documentation and examples for all DI source files
- Added comprehensive English documentation for all DI generator and support files:
* inject_generator.dart — full class/method doc-comments, usage samples
* module_generator.dart — doc-comments, feature explanation, complete example
* src/annotation_validator.dart — class and detailed static method descriptions
* src/type_parser.dart — doc, example for ParsedType and TypeParser, specific codegen notes
* src/bind_spec.dart — interface, static factory, and codegen docs with DI scenarios
* src/bind_parameters_spec.dart — details and samples for code generation logic
* src/metadata_utils.dart — full doc and examples for annotation utilities
* src/exceptions.dart — user- and contributor-friendly errors, structured output, category explanations
* src/generated_class.dart — usage-centric doc-comments, example of resulting generated DI class
- Removed Russian/duplicate comments for full clarity and maintainability
- Ensured that new and existing contributors can easily extend and maintain DI code generation logic
BREAKING CHANGE: All documentation now English-only; comments include usage examples for each principal structure or routine
See #docs, #generator, #cherrypick
2025-08-13 08:57:06 +03:00
|
|
|
library;
|
2025-05-18 15:43:02 +03:00
|
|
|
|
docs(generator): improve and unify English documentation and examples for all DI source files
- Added comprehensive English documentation for all DI generator and support files:
* inject_generator.dart — full class/method doc-comments, usage samples
* module_generator.dart — doc-comments, feature explanation, complete example
* src/annotation_validator.dart — class and detailed static method descriptions
* src/type_parser.dart — doc, example for ParsedType and TypeParser, specific codegen notes
* src/bind_spec.dart — interface, static factory, and codegen docs with DI scenarios
* src/bind_parameters_spec.dart — details and samples for code generation logic
* src/metadata_utils.dart — full doc and examples for annotation utilities
* src/exceptions.dart — user- and contributor-friendly errors, structured output, category explanations
* src/generated_class.dart — usage-centric doc-comments, example of resulting generated DI class
- Removed Russian/duplicate comments for full clarity and maintainability
- Ensured that new and existing contributors can easily extend and maintain DI code generation logic
BREAKING CHANGE: All documentation now English-only; comments include usage examples for each principal structure or routine
See #docs, #generator, #cherrypick
2025-08-13 08:57:06 +03:00
|
|
|
/// CherryPick code generation library: entry point for build_runner DI codegen.
|
|
|
|
|
///
|
|
|
|
|
/// This library exports generators for CherryPick dependency injection:
|
|
|
|
|
/// - [ModuleGenerator]: Generates DI module classes for all `@module()`-annotated classes.
|
|
|
|
|
/// - [InjectGenerator]: Generates field-injection mixins for classes annotated with `@injectable()`.
|
|
|
|
|
///
|
|
|
|
|
/// These generators are hooked into [build_runner] and cherrypick_generator's builder configuration.
|
|
|
|
|
/// Normally you do not import this directly; instead, add cherrypick_generator
|
|
|
|
|
/// as a dev_dependency and run `dart run build_runner build`.
|
|
|
|
|
///
|
|
|
|
|
/// Example usage in `build.yaml` or your project's workflow:
|
|
|
|
|
/// ```yaml
|
|
|
|
|
/// targets:
|
|
|
|
|
/// $default:
|
|
|
|
|
/// builders:
|
|
|
|
|
/// cherrypick_generator|cherrypick_generator:
|
|
|
|
|
/// generate_for:
|
|
|
|
|
/// - lib/**.dart
|
|
|
|
|
/// ```
|
|
|
|
|
///
|
|
|
|
|
/// For annotation details, see `package:cherrypick_annotations`.
|
2025-05-17 00:34:56 +03:00
|
|
|
export 'module_generator.dart';
|
2025-05-23 12:21:23 +03:00
|
|
|
export 'inject_generator.dart';
|