Skip to content

Commit

Permalink
Small cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Dec 21, 2023
1 parent b10f448 commit fd747fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cronet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
- main
- master
paths:
- '.github/workflows/**'
- '.github/workflows/cronet.yaml'
- 'pkgs/cronet_http/**'
- 'pkgs/http_client_conformance_tests/**'
pull_request:
paths:
- '.github/workflows/**'
- '.github/workflows/cronet.yaml'
- 'pkgs/cronet_http/**'
- 'pkgs/http_client_conformance_tests/**'
schedule:
Expand Down Expand Up @@ -58,8 +58,8 @@ jobs:
uses: reactivecircus/android-emulator-runner@v2
if: always() && steps.install.outcome == 'success'
with:
api-level: 28
target: ${{ matrix.package == 'cronet_http_embedded' && 'default' || 'playstore' }}
api-level: 19
target: ${{ matrix.package == 'cronet_http_embedded' && 'google_apis' || 'playstore' }}
arch: x86_64
profile: pixel
script: cd 'pkgs/${{ matrix.package }}/example' && flutter test --timeout=1200s integration_test/
9 changes: 5 additions & 4 deletions pkgs/cronet_http/tool/prepare_for_embedded.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
/// 1. Modifying the Gradle build file to reference the embedded Cronet.
/// 2. Modifying the *name* and *description* in `pubspec.yaml`.
/// 3. Replacing `README.md` with `README_EMBEDDED.md`.
/// 4. Change the name of `cronet_http.dart` to `cronet_http_embedded.dart`.
/// 5. Update all the imports from `package:cronet_http/cronet_http.dart` to
/// `package:cronet_http_embedded/cronet_http_embedded.dart`
///
/// After running this script, `flutter pub publish`
/// can be run to update package:cronet_http_embedded.
Expand Down Expand Up @@ -40,8 +43,6 @@ final _cronetVersionUri = Uri.https(
'android/maven2/org/chromium/net/group-index.xml',
);

/// Runs `prepare_for_embedded.dart publish` for publishing,
/// or only the Android dependency will be modified.
void main(List<String> args) async {
if (Directory.current.path.endsWith('tool')) {
_packageDirectory = Directory.current.parent;
Expand All @@ -53,8 +54,8 @@ void main(List<String> args) async {
updateCronetDependency(latestVersion);
updatePubSpec();
updateReadme();
updateLibraryName();
updateImports();
updateEntryPoint();
}

Future<String> _getLatestCronetVersion() async {
Expand Down Expand Up @@ -129,7 +130,7 @@ void updateImports() {
}
}

void updateEntryPoint() {
void updateLibraryName() {
print('Renaming cronet_http.dart to cronet_http_embedded.dart');
File(
'${_packageDirectory.path}/lib/cronet_http.dart',
Expand Down

0 comments on commit fd747fc

Please sign in to comment.