Skip to content

Commit

Permalink
[jnigen] Updated docs to reflect renames (#146)
Browse files Browse the repository at this point in the history
* Updated docs to reflect renames (`JniObject` -> `JObject`)
* Updated llvm versions for linux dylib lookup as tests weren't passing
  • Loading branch information
HosseinYousefi authored Nov 23, 2022
1 parent 1f004e6 commit 534e92f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkgs/jni/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## 0.1.0
* Initial version: Android and Linux support, JniObject API
* Initial version: Android and Linux support, JObject API

## 0.1.1
* Windows support for running tests and examples on development machines.
2 changes: 1 addition & 1 deletion pkgs/jni/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This library contains:

* Some Android-specific helpers (get application context and current activity references).

* `JniObject` class, which provides base class for classes generated by jnigen.
* `JObject` class, which provides base class for classes generated by jnigen.

Apart from being the base library for code generated by `jnigen` this can also be used for one-off uses of the JNI and debugging. __To generate type-safe bindings from Java libraries, use `jnigen`.__

Expand Down
2 changes: 2 additions & 0 deletions pkgs/jni/third_party/ffigen_patch_jni/lib/src/strings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ const linuxDylibLocations = {
'/usr/lib/llvm-11/lib/',
'/usr/lib/llvm-12/lib/',
'/usr/lib/llvm-13/lib/',
'/usr/lib/llvm-14/lib/',
'/usr/lib/llvm-15/lib/',
'/usr/lib/',
'/usr/lib64/',
};
Expand Down
4 changes: 2 additions & 2 deletions pkgs/jnigen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ final ffi.Pointer<T> Function<T extends ffi.NativeType>(String sym) jniLookup =
ProtectedJniExtensions.initGeneratedLibrary("android_utils");
/// from: com.example.in_app_java.AndroidUtils
class AndroidUtils extends jni.JniObject {
class AndroidUtils extends jni.JObject {
AndroidUtils.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
static final _showToast = jniLookup<
Expand All @@ -48,7 +48,7 @@ class AndroidUtils extends jni.JniObject {
/// from: static public void showToast(android.app.Activity mainActivity, java.lang.CharSequence text, int duration)
static void showToast(
jni.JniObject mainActivity, jni.JniObject text, int duration) =>
jni.JObject mainActivity, jni.JObject text, int duration) =>
_showToast(mainActivity.reference, text.reference, duration).check();
}
```
Expand Down

0 comments on commit 534e92f

Please sign in to comment.