Skip to content

Commit

Permalink
Update prepare_for_embedded.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 authored Dec 5, 2023
1 parent 47d1b93 commit f9fcb4f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkgs/cronet_http/tool/prepare_for_embedded.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,19 @@ void updateCronetDependency(String latestVersion) {
fBuildGradle.writeAsStringSync(newGradleContent);
}

/// Update pubspec.yaml
/// Update pubspec.yaml and example/pubspec.yaml
void updatePubSpec() {
final fPubspec = File('${_packageDirectory.path}/pubspec.yaml');
final yamlEditor = YamlEditor(fPubspec.readAsStringSync())
..update(['name'], _packageName)
..update(['description'], _packageDescription);
fPubspec.writeAsStringSync(yamlEditor.toString());
final examplePubspec = File('${_packageDirectory.path}/pubspec.yaml');
final replaced = examplePubspec.readAsStringSync().replaceAll(
'cronet_http:'
'cronet_http_embedded:',
);
examplePubspec.writeAsStringSync(replaced);
}

/// Move README_EMBEDDED.md to replace README.md
Expand Down

0 comments on commit f9fcb4f

Please sign in to comment.