deps(jni): Bump JNI to 1.0.0#3639
Conversation
Migrate all JNI binding usage to the new API: - Java setters/getters are now Dart property setters/getters - Collection factories changed (JList.array -> JArrayList, JMap.hash -> JHashMap) - Type checks use isA()/as() instead of $Type marker classes - Conversion methods renamed (intValue -> toDartInt, etc.) - JByteArray.from -> JByteArray.of - Generic type params replace runtime T: named parameter Add tool/generate_jni.dart with a custom jnigen visitor to exclude getter/setter pairs with nullability mismatches (jnigen 0.16.0 bug where getters return T? but setters accept T). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep the original JString key reference for removal instead of converting to Dart string and back. Release non-matching keys immediately to avoid accumulating JNI references. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # packages/flutter/lib/src/native/java/binding.dart
Regenerate binding.dart to incorporate new methods from the updated Android SDK on main (isStrictTraceContinuation, orgId, projectId). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Dependencies
Internal Changes
🤖 This preview updates automatically when you update the PR. |
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3639 +/- ##
==========================================
+ Coverage 86.96% 91.80% +4.83%
==========================================
Files 320 102 -218
Lines 10789 3479 -7310
==========================================
- Hits 9383 3194 -6189
+ Misses 1406 285 -1121
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Use the custom generate_jni.dart tool instead of running jnigen directly. The tool applies a visitor that excludes methods with getter/setter nullability mismatches (jnigen 0.16.0 bug). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📲 Install BuildsAndroid
|
Flesh out the span-first trace lifecycle and navigator-observer changelog entries with sub-bullets describing the behavior and dart snippets showing how to opt in / restore the old default. Matches the style used in the 9.0.0 and 9.14.0 release notes. Made-with: Cursor Co-authored-by: Cursor Agent <noreply@cursor.com>
📜 Description
Now that the JNI packages is decoupled from Flutter we can easily bump it since we are not bound to the min Flutter version anymore.
💡 Motivation and Context
Fixes #3601
Closes #3620
💚 How did you test it?
📝 Checklist
sendDefaultPiiis enabled🔮 Next steps