Skip to content

Commit f59cd79

Browse files
[cronet_http] Upgrade jni and jnigen to 0.12.0 (#1311)
1 parent aded576 commit f59cd79

File tree

12 files changed

+2335
-2315
lines changed

12 files changed

+2335
-2315
lines changed

pkgs/cronet_http/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* Throw `ClientException` if `CronetClient.send` runs out of Java heap while
44
allocating memory for the request body.
5+
* Upgrade `package:jni` and `package:jnigen` to 0.12.0.
56

67
## 1.3.2
78

pkgs/cronet_http/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.4.2'
12+
classpath 'com.android.tools.build:gradle:8.1.0'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}

pkgs/cronet_http/example/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2828
android {
2929
compileSdkVersion flutter.compileSdkVersion
3030
ndkVersion flutter.ndkVersion
31+
namespace 'io.flutter.cronet_http_example'
3132

3233
compileOptions {
3334
sourceCompatibility JavaVersion.VERSION_1_8
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="io.flutter.cronet_http_example">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<uses-permission android:name="android.permission.INTERNET"/>
43
</manifest>

pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="io.flutter.cronet_http_example">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<uses-permission android:name="android.permission.INTERNET"/>
43
<application
54
android:label="cronet_http_example"
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="io.flutter.cronet_http_example">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<uses-permission android:name="android.permission.INTERNET"/>
43
</manifest>

pkgs/cronet_http/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.4.2'
9+
classpath 'com.android.tools.build:gradle:8.6.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip

pkgs/cronet_http/jnigen.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,3 @@ classes:
1818
- 'org.chromium.net.UploadDataProviders'
1919
- 'org.chromium.net.UrlRequest'
2020
- 'org.chromium.net.UrlResponseInfo'
21-
22-
enable_experiment:
23-
- 'interface_implementation'

pkgs/cronet_http/lib/src/cronet_client.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks(
157157
// The order of callbacks generated by Cronet is documented here:
158158
// https://developer.android.com/guide/topics/connectivity/cronet/lifecycle
159159
return jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface.implement(
160-
jb.$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl(
160+
jb.$UrlRequestCallbackProxy_UrlRequestCallbackInterface(
161161
onResponseStarted: (urlRequest, responseInfo) {
162162
responseStream = StreamController();
163163
final responseHeaders =
@@ -377,7 +377,7 @@ class CronetClient extends BaseClient {
377377

378378
final builder = engine._engine.newUrlRequestBuilder(
379379
request.url.toString().toJString(),
380-
jb.UrlRequestCallbackProxy.new1(
380+
jb.UrlRequestCallbackProxy(
381381
_urlRequestCallbacks(request, responseCompleter, profile)),
382382
_executor,
383383
)..setHttpMethod(request.method.toJString());
@@ -407,7 +407,7 @@ class CronetClient extends BaseClient {
407407
}
408408

409409
builder.setUploadDataProvider(
410-
jb.UploadDataProviders.create2(data), _executor);
410+
jb.UploadDataProviders.create$2(data), _executor);
411411
}
412412
builder.build().start();
413413
return responseCompleter.future;

0 commit comments

Comments
 (0)