File tree Expand file tree Collapse file tree 5 files changed +525
-438
lines changed
Expand file tree Collapse file tree 5 files changed +525
-438
lines changed Original file line number Diff line number Diff line change 2121 PUB_ENVIRONMENT : bot.github
2222
2323jobs :
24+ generate :
25+ name : jnigen
26+ runs-on : ubuntu-latest
27+ defaults :
28+ run :
29+ working-directory : pkgs/cronet_http
30+ steps :
31+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
32+ - uses : actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165
33+ with :
34+ distribution : ' zulu'
35+ java-version : ' 17'
36+ - uses : subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e
37+ with :
38+ channel : ' stable'
39+ - id : install
40+ name : Install dependencies
41+ run : flutter pub get
42+ - name : Build APK
43+ run : cd example && flutter build apk && cd ..
44+ - name : Upgrade
45+ # Set this to `true` if you are using this workflow to regenerate the jni
46+ # bindings.
47+ if : false
48+ run : dart pub upgrade --major-versions jnigen jni
49+ - name : Regenerate
50+ run : dart run jnigen --config jnigen.yaml
51+ - name : Generated Diff
52+ id : diff
53+ run : git diff --exit-code lib/src/jni/jni_bindings.dart
54+ - name : Upload bindings
55+ if : failure()
56+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
57+ with :
58+ name : JNI Bindings
59+ path : pkgs/cronet_http/lib/src/jni/jni_bindings.dart
60+ retention-days : 1
2461 verify :
2562 name : Format & Analyze & Test (${{ matrix.cronetHttpNoPlay == 'true' && 'without Google Play' || 'with Google Play'}})
2663 runs-on : ubuntu-cpu16-ram64
Original file line number Diff line number Diff line change 1- ## 1.6.1 -wip
1+ ## 1.7.0 -wip
22
33* Fix a bug where cronet would throw ` ClassNotFoundException ` in debug mode.
4+ * Upgrade ` package:jni ` to 0.15.2 and ` package:jnigen ` to 0.15.0.
45
56## 1.6.0
67
Original file line number Diff line number Diff line change @@ -125,8 +125,7 @@ class CronetEngine {
125125 bool ? enableQuic,
126126 String ? storagePath,
127127 String ? userAgent}) {
128- final builder = jb.CronetEngine$Builder (
129- JObject .fromReference (Jni .getCachedApplicationContext ()));
128+ final builder = jb.CronetEngine$Builder (Jni .androidApplicationContext);
130129
131130 try {
132131 if (storagePath != null ) {
You can’t perform that action at this time.
0 commit comments