Skip to content

Commit

Permalink
Merge pull request #4 from danieletulone/main
Browse files Browse the repository at this point in the history
Upgrade analyzer, sdk, build runner, dart_style and source_gen
  • Loading branch information
simphotonics authored Jan 21, 2025
2 parents 69290dd + a8c79c4 commit 304ea5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 5 additions & 3 deletions lib/src/builders/synthetic_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ abstract class SyntheticBuilder<S extends SyntheticInput> implements Builder {
this.header = '',
this.footer = '',
Formatter? formatter,
}) : formatter = formatter ?? DartFormatter().format,
}) : formatter = formatter ??
DartFormatter(languageVersion: DartFormatter.latestLanguageVersion)
.format,
syntheticInput = SyntheticInput.instance<S>();

/// Input files. Specify the complete path relative to the
Expand Down Expand Up @@ -123,8 +125,8 @@ abstract class SyntheticBuilder<S extends SyntheticInput> implements Builder {
// Read library.
final library = await buildStep.resolver.libraryFor(assetId);
// Get dependencies
for (final import in library.libraryImports) {
final uri = Uri.parse(import.uri.toString());
for (final import in library.importedLibraries) {
final uri = Uri.parse(import.source.uri.toString());
// Skip if uri scheme is not "package" or "asset".
if (uri.scheme == 'package' ||
uri.scheme == 'asset' ||
Expand Down
13 changes: 6 additions & 7 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,22 @@ topics:
- build-runner
- source-code-generator



environment:
sdk: '^3.0.0'
sdk: '^3.6.0'

dependencies:
analyzer: ^6.4.1
analyzer: ^7.0.0
build: ^2.4.1
build_runner: ^2.4.9
dart_style: ^2.3.6
build_runner: ^2.4.14
dart_style: ^3.0.1
directed_graph: ^0.4.3
exception_templates: ^0.3.0
file: ^7.0.0
glob: ^2.1.2
lazy_memo: ^0.2.3
path: ^1.9.0
source_gen: ^1.5.0
source_gen: ^2.0.0

#dependency_overrides:
# source_gen:
# git:
Expand Down

0 comments on commit 304ea5c

Please sign in to comment.