Skip to content

Commit

Permalink
Upgrade jni and jnigen to 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HosseinYousefi committed Apr 10, 2024
1 parent caad9ca commit 55614c2
Show file tree
Hide file tree
Showing 5 changed files with 1,293 additions and 1,221 deletions.
1 change: 1 addition & 0 deletions pkgs/cronet_http/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ include: ../../analysis_options.yaml

analyzer:
exclude:
- lib/src/jni/jni_bindings.dart
- lib/src/messages.dart
- pigeons/messages.dart
3 changes: 0 additions & 3 deletions pkgs/cronet_http/jnigen.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Regenerate bindings with `dart run jnigen --config jnigen.yaml`.

summarizer:
backend: asm

android_sdk_config:
add_gradle_deps: true
android_example: 'example/'
Expand Down
6 changes: 2 additions & 4 deletions pkgs/cronet_http/lib/src/cronet_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class CronetEngine {
String? storagePath,
String? userAgent}) {
final builder = jb.CronetEngine_Builder(
JObject.fromRef(Jni.getCachedApplicationContext()));
JObject.fromReference(Jni.getCachedApplicationContext()));

try {
if (storagePath != null) {
Expand Down Expand Up @@ -284,9 +284,7 @@ class CronetClient extends BaseClient {
/// Indicates that [CronetClient] is responsible for closing [_engine].
final bool _closeEngine;

CronetClient._(this._engine, this._closeEngine) {
Jni.initDLApi();
}
CronetClient._(this._engine, this._closeEngine);

/// A [CronetClient] that will be initialized with a new [CronetEngine].
factory CronetClient.defaultCronetEngine() => CronetClient._(null, true);
Expand Down
Loading

0 comments on commit 55614c2

Please sign in to comment.