Skip to content

[cronet_http] Upgrade jni to 0.9.2 and publish 1.2.1 - #1198

Merged
brianquinlan merged 3 commits into
masterfrom
jni-0.9.2
May 16, 2024
Merged

brianquinlan merged 3 commits into
masterfrom
jni-0.9.2

Conversation

@HosseinYousefi

@HosseinYousefi HosseinYousefi commented May 14, 2024 •

Copy link
Copy Markdown
Contributor

Fix our users' issue described here: dart-lang/native#1119.

@brianquinlan Please manually publish as cronet currently needs Flutter and it won't work with the autopublish CI.

@brianquinlan brianquinlan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests timed-out so I restarted them. I have one more Dart 3.4-releated change to land and then I will publish this.

Comment thread pkgs/cronet_http/CHANGELOG.md Resolved
Comment thread pkgs/cronet_http/pubspec.yaml Resolved
@github-actions

Copy link
Copy Markdown

Package publishing

Package Version Status Publish tag (post-merge)
package:http_profile 0.1.0 ready to publish http_profile-v0.1.0
package:cronet_http 1.2.1-wip WIP (no publish necessary)
package:cupertino_http 1.4.1-wip WIP (no publish necessary)
package:http 1.2.2-wip WIP (no publish necessary)
package:web_socket 0.1.3 already published at pub.dev

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@brianquinlan

Copy link
Copy Markdown
Collaborator

The emulator isn't even starting before the tests time out. Hopefully this is a temporary github glitch.

@techouse

techouse commented May 14, 2024 •

Copy link
Copy Markdown

I encountered the error described in dart-lang/native#1119 when I upgraded AGP to v8.4.0. It works fine with AGP v8.3.2.

@HosseinYousefi

Copy link
Copy Markdown
Contributor Author

I encountered the error described in dart-lang/native#1119 when I upgraded AGP to v8.4.0. It works fine with AGP v8.3.2.

but the upgrade to minSdk 21 fixes it on AGP v8.4.0, right?

@techouse

techouse commented May 15, 2024 •

Copy link
Copy Markdown

Not on the app level. My

android.defaultConfig.minSdkVersion 24

still fails with the same error.

It has most likely something to do with the jni plugin.

@brianquinlan

Copy link
Copy Markdown
Collaborator

I think that the CI is broken. Working on fixing it.

@HosseinYousefi

Copy link
Copy Markdown
Contributor Author

Not on the app level. My

android.defaultConfig.minSdkVersion 24

still fails with the same error.

It has most likely something to do with the jni plugin.

I meant after the fix to jni. You can override the jni dependency to use 0.9.2 and try.

@HosseinYousefi

Copy link
Copy Markdown
Contributor Author

I think that the CI is broken. Working on fixing it.

Thanks! Merge this whenever you see fit then.

@techouse

Copy link
Copy Markdown

I meant after the fix to jni. You can override the jni dependency to use 0.9.2 and try.

You mean just use this PR instead of v1.2.0? Sure, gimme a few minutes.

@HosseinYousefi

Copy link
Copy Markdown
Contributor Author

I meant after the fix to jni. You can override the jni dependency to use 0.9.2 and try.

You mean just use this PR instead of v1.2.0? Sure, gimme a few minutes.

Yeah, you can do that too,

Here's the dependency!

cronet_http:
  git:
    url: https://github.com/dart-lang/http
    ref: jni-0.9.2
    path: pkgs/cronet_http

@techouse

techouse commented May 16, 2024 •

Copy link
Copy Markdown

Yep, compiles ok using

  • Flutter: v3.19.6
  • Kotlin: v1.9.24
  • AGP: 8.4.0

Running OK on Android 14 (Pixel 6) with this config

dependency_overrides:
  cronet_http:
    git:
      url: https://github.com/dart-lang/http.git
      ref: jni-0.9.2
      path: pkgs/cronet_http

and android/app/build.gradle

dependencies {
  implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.9.24"))
}

(I'm not 100% sure this is still needed.)

It only complains about

/Users/techouse/.pub-cache/hosted/pub.dev/jni-0.9.2/android/src/main/java/com/github/dart_lang/jni/JniPlugin.java uses or overrides a deprecated API.

So I guess you're good to go 🚀

@HosseinYousefi

Copy link
Copy Markdown
Contributor Author

It only complains about

/Users/techouse/.pub-cache/hosted/pub.dev/jni-0.9.2/android/src/main/java/com/github/dart_lang/jni/JniPlugin.java uses or overrides a deprecated API.

Yeah, that's not a problem. Although, I thought I have silenced this warning here: https://github.com/dart-lang/native/blob/main/pkgs/jni/android/src/main/java/com/github/dart_lang/jni/JniPlugin.java#L22 🤔

@brianquinlan
brianquinlan merged commit 76deb75 into master May 16, 2024
@brianquinlan
brianquinlan deleted the jni-0.9.2 branch May 16, 2024 20:58
copybara-service Bot pushed a commit to dart-lang/sdk that referenced this pull request May 16, 2024
Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (https://github.com/dart-lang/async/compare/09cba7f..77a25d7):
  77a25d7  2024-05-15  Sarah Zakarias  Add `topics` to `pubspec.yaml` (dart-archive/async#274)

dartdoc (https://github.com/dart-lang/dartdoc/compare/2e706be..476d5cc):
  476d5cc8  2024-05-16  Sam Rawlins  Refactor PackageGraph._tagReexportsFor and document (dart-lang/dartdoc#3772)
  24658cca  2024-05-14  Sam Rawlins  Privatize CommentReferenceParser._codeRef (dart-lang/dartdoc#3771)
  dff86ed9  2024-05-14  Sam Rawlins  Bump to 8.0.9 (dart-lang/dartdoc#3770)

http (https://github.com/dart-lang/http/compare/4722e03..76deb75):
  76deb75  2024-05-16  Hossein Yousefi  [cronet_http] Upgrade jni to 0.9.2 and publish 1.2.1 (dart-lang/http#1198)
  ec55561  2024-05-15  Brian Quinlan  [cronet] Use the same host and Android emulator architecture. (dart-lang/http#1201)

lints (https://github.com/dart-lang/lints/compare/f0205c1..b254c7e):
  b254c7e  2024-05-16  Devon Carew  Update README.md (dart-archive/lints#189)
  5fef508  2024-05-13  Lasse R.H. Nielsen  Tighten up the `gen_docs.dart` script. (dart-archive/lints#187)

test (https://github.com/dart-lang/test/compare/84d2a2b..2464ad5):
  2464ad5c  2024-05-16  Sarah Zakarias  Add `topics` to  package "test" `pubspec.yaml` (dart-lang/test#2230)
  6540a360  2024-05-15  dependabot[bot]  Bump the github-actions group across 1 directory with 3 updates (dart-lang/test#2229)
  4b6f029c  2024-05-15  dependabot[bot]  Bump dart_flutter_team_lints from 2.1.1 to ^3.0.0 in all packages (dart-lang/test#2228)

webdev (https://github.com/dart-lang/webdev/compare/d46cf50..fc32eb6):
  fc32eb69  2024-05-14  Elliott Brooks  Collect log message count and log at the end (dart-lang/webdev#2430)
  99abc535  2024-05-14  Elliott Brooks  Wait for a `resume` event to run the `main()` method after a page refresh (dart-lang/webdev#2431)

Change-Id: Iee28bacfc028c92e4b59d95f0c7e61f8282d2968
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366980
Auto-Submit: Devon Carew <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants