Skip to content

Commit

Permalink
[jnigen] Add some documentation (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh-hegde authored Nov 15, 2022
1 parent feed699 commit b3f01ca
Show file tree
Hide file tree
Showing 4 changed files with 270 additions and 45 deletions.
21 changes: 3 additions & 18 deletions pkgs/jni/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# jni (experimental module)
# jni

This is a utility library to access JNI from Dart / Flutter code, intended as a supplement for `jnigen` code generator, as well as provide the common base components (such as managing the JVM instance) to the code generated by `jnigen`.
This is a support library to access JNI from Dart / Flutter code. This provides the common infrastructure to bindings generated by [jnigen](https://pub.dev/packages/jnigen), as well as some utility methods.

This library contains:

Expand All @@ -12,24 +12,9 @@ This library contains:

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

This is intended for one-off / debugging uses of JNI, as well as providing a base library for code generated by jnigen.

__To generate type-safe bindings from Java libraries, use `jnigen`.__

## SDK Note
Dart standalone is supported, but due to some current limitations of the `pubspec` format, `dart` command must be from Flutter SDK and not dart SDK.

## Version note
This library is at an early stage of development and we do not provide backwards compatibility of the API at this point.
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`.__

## Documentation
The test/ directory contains files with comments explaining the basics of this module, and the example/ directory contains a flutter example which also touches some Android-specifics.

Using this library assumes some familiarity with JNI - it's threading model and object references, among other things.

## jnigen

This library is a part of `jnigen` - a 2022 GSoC project.

The broader aim of jnigen is making Java APIs accessible from dart in an idiomatic way.

Loading

0 comments on commit b3f01ca

Please sign in to comment.