-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
911c67a
commit 27ba8f0
Showing
5 changed files
with
31 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
import 'dart:async'; | ||
import 'dart:convert'; | ||
// import 'dart:async'; | ||
// import 'dart:convert'; | ||
|
||
import 'package:build/build.dart'; | ||
import 'package:pub_api_client/src/helpers/google_packages.dart'; | ||
// import 'package:build/build.dart'; | ||
// import 'package:pub_api_client/src/helpers/google_packages.dart'; | ||
|
||
Builder googleDepsBuilder([BuilderOptions? options]) => _DepsBuilder(); | ||
// Builder googleDepsBuilder([BuilderOptions? options]) => _DepsBuilder(); | ||
|
||
class _DepsBuilder implements Builder { | ||
@override | ||
Future build(BuildStep buildStep) async { | ||
final googleDeps = await getGooglePackages(); | ||
final deps = jsonEncode(googleDeps); | ||
await buildStep.writeAsString( | ||
AssetId(buildStep.inputId.package, | ||
'lib/src/helpers/google_packages_list.dart'), | ||
''' | ||
// Generated code. Do not modify. | ||
const googlePackagesList = $googleDeps ; | ||
'''); | ||
} | ||
// class _DepsBuilder implements Builder { | ||
// @override | ||
// Future build(BuildStep buildStep) async { | ||
// final googleDeps = await getGooglePackages(); | ||
// final deps = jsonEncode(googleDeps); | ||
// await buildStep.writeAsString( | ||
// AssetId(buildStep.inputId.package, | ||
// 'lib/src/helpers/google_packages_list.dart'), | ||
// ''' | ||
// // Generated code. Do not modify. | ||
// const googlePackagesList = $googleDeps ; | ||
// '''); | ||
// } | ||
|
||
@override | ||
final buildExtensions = const { | ||
r'$lib$': ['src/helpers/google_packages_list.dart'] | ||
}; | ||
} | ||
// @override | ||
// final buildExtensions = const { | ||
// r'$lib$': ['src/helpers/google_packages_list.dart'] | ||
// }; | ||
// } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
name: pub_api_client | ||
description: An API Client for Pub to interact with public package information. | ||
version: 1.0.9 | ||
version: 2.0.0-beta.1 | ||
homepage: https://github.com/leoafarias/pub_api_client | ||
|
||
environment: | ||
sdk: '>=2.12.0 <3.0.0' | ||
|
||
dependencies: | ||
pub_semver: ^2.0.0 | ||
freezed_annotation: ^0.14.1 | ||
http: ^0.13.1 | ||
json_annotation: ^4.0.1 | ||
pub_semver: ^2.0.0 | ||
pubspec: ^2.0.1 | ||
pubspec_parse: ^1.0.0 | ||
|
||
|
||
|
||
dev_dependencies: | ||
build_runner: ^1.12.2 | ||
build_version: ^2.0.2 | ||
freezed: ^0.14.1+1 | ||
json_serializable: ^4.1.0 | ||
pedantic: ^1.11.0 | ||
|
||
test: ^1.16.8 | ||
test_cov: ^1.0.1 |