Skip to content

Commit

Permalink
Merge pull request #593 from lamarios/feature/revert-cronet
Browse files Browse the repository at this point in the history
remove cronet but keep the security config
  • Loading branch information
lamarios authored Sep 16, 2024
2 parents f5ea88d + 3dd95ef commit b426bdb
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
# - name: Run tests with nix (starts postgres and invidious server)
# run: nix-shell --run './submodules/flutter/bin/flutter test'
- run: ./submodules/flutter/bin/flutter pub run flutter_native_splash:create
- run: ./submodules/flutter/bin/flutter build apk --profile --split-per-abi --dart-define=cronetHttpNoPlay=true
- run: ./submodules/flutter/bin/flutter build apk --profile --split-per-abi
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ jobs:
./submodules/flutter/bin/flutter config --no-analytics
./submodules/flutter/bin/flutter pub get
./submodules/flutter/bin/flutter pub run flutter_native_splash:create
./submodules/flutter/bin/flutter build apk --split-per-abi --dart-define=cronetHttpNoPlay=true
./submodules/flutter/bin/flutter build apk --dart-define=cronetHttpNoPlay=true
./submodules/flutter/bin/flutter build appbundle --dart-define=cronetHttpNoPlay=true
./submodules/flutter/bin/flutter build apk --split-per-abi
./submodules/flutter/bin/flutter build apk
./submodules/flutter/bin/flutter build appbundle
- name: Moving build artifacts
run: |
mkdir -p build/app/outputs/flutter-apk
Expand Down
10 changes: 1 addition & 9 deletions lib/service.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import 'dart:convert';
import 'dart:io' show Platform;

import 'package:flutter/foundation.dart';
import 'package:flutter_web_auth/flutter_web_auth.dart';
import 'package:http/http.dart' as http;
import 'package:http/http.dart';
import 'package:cronet_http/cronet_http.dart';
import 'package:invidious/channels/models/channel_sort_by.dart';
import 'package:invidious/extensions.dart';
import 'package:invidious/globals.dart';
Expand Down Expand Up @@ -81,13 +79,7 @@ class Service {
final log = Logger('Service');
final Client httpClient;

Service()
: httpClient = Platform.isAndroid
? CronetClient.fromCronetEngine(
CronetEngine.build(
cacheMode: CacheMode.memory, cacheMaxSize: 2 * 1024 * 1024),
closeEngine: true)
: http.Client();
Service() : httpClient = http.Client();

String urlFormatForLog(Uri? uri) {
return kDebugMode ? uri.toString() : '${uri?.replace(host: 'xxxxxxxxxx')}';
Expand Down
1 change: 0 additions & 1 deletion linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
jni
)

set(PLUGIN_BUNDLED_LIBRARIES)
Expand Down
24 changes: 0 additions & 24 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.2"
cronet_http:
dependency: "direct main"
description:
name: cronet_http
sha256: "3af9c4d57bf07ef4b307e77b22be4ad61bea19ee6ff65e62184863f3a09f1415"
url: "https://pub.dev"
source: hosted
version: "1.3.2"
cross_file:
dependency: transitive
description:
Expand Down Expand Up @@ -732,14 +724,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.2"
http_profile:
dependency: transitive
description:
name: http_profile
sha256: "7e679e355b09aaee2ab5010915c932cce3f2d1c11c3b2dc177891687014ffa78"
url: "https://pub.dev"
source: hosted
version: "0.1.0"
image:
dependency: transitive
description:
Expand All @@ -764,14 +748,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.4"
jni:
dependency: transitive
description:
name: jni
sha256: f377c585ea9c08d48b427dc2e03780af2889d1bb094440da853c6883c1acba4b
url: "https://pub.dev"
source: hosted
version: "0.10.1"
js:
dependency: transitive
description:
Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: invidious
version: 1.21.0+4059
version: 1.21.1+4060
publish_to: none
description: A new Flutter project.
environment:
Expand All @@ -16,7 +16,6 @@ dependencies:
cached_network_image: 3.4.1
carousel_slider: 5.0.0
copy_with_extension: 5.0.4
cronet_http: 1.3.2
device_info_plus: 10.1.2
dio: 5.7.0
downloadsfolder: 1.1.0
Expand Down
1 change: 0 additions & 1 deletion windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
jni
)

set(PLUGIN_BUNDLED_LIBRARIES)
Expand Down

0 comments on commit b426bdb

Please sign in to comment.