feat: migrate to analyzer 9.0.0 API

- Replace Element2 API with Element API
- Update imports from element2.dart to element.dart
- Replace .firstFragment.name2 with .name
- Replace .firstFragment.metadata2.annotations with .metadata.annotations
- Replace .fields2 with .fields
- Replace .methods2 with .methods
- Remove duplicate imports in annotation_validator.dart and generated_class.dart
- Update test mocks to use Element instead of Element2

All generators now work correctly with analyzer 9.0.0:
- melos analyze: SUCCESS (0 issues)
- melos codegen: SUCCESS (13 outputs generated)
- melos bootstrap: SUCCESS (8 packages)
This commit is contained in:
Sergey Penkovsky
2026-01-30 10:48:48 +03:00
parent e6b3017384
commit 0e555a6849
13 changed files with 90 additions and 154 deletions

View File

@@ -41,7 +41,7 @@ dev_dependencies:
cherrypick_generator: ^4.0.0-dev.0
json_serializable: ^6.9.0
retrofit_generator: ^10.0.5
retrofit_generator: ^10.2.1
auto_route_generator: ^10.0.1
freezed: ^3.0.0
melos: ^6.3.2