jnigen 0.12.0
jnigen: ^0.12.0 copied to clipboard
A Dart bindings generator for Java and Kotlin that uses JNI under the hood to interop with Java virtual machine.
0.12.0 #
- Breaking Change(#1530):
Changed the renaming strategy for method overloadings. Instead of adding a
numeric suffix, we add a dollar sign (
$) and then the numeric suffix. This is done to avoid name collision between methods that originally end with numeric suffices and the renamed overloads. Similarly names that are Dart keywords get a dollar sign suffix now. For more information, check out the documentation. - Breaking Change: Each single dollar sign is replaced with two dollar signs in the identifier names.
- Breaking Change: Removed the
Implsuffix from the generated implemenation classes. So the implementation class for an interface namedFoois now simply called$Fooinstead of$FooImpl. - Breaking Change: Renamed and made the typeclasses internal.
- Breaking Change: Relaxed the renaming rules to allow for more identifiers to remain unchanged.
- Added
JImplementerwhich enables building an object that implements multiple Java interfaces. Each interface now has a staticimplementInmethod that takes aJImplementerand the implementation object. - Added the ability to implement void-returning interface methods as listeners.
- Generating identifiers that start with an underscore (
_) and making them public by prepending a dollar sign. - Fixed an issue where inheriting a generic class could generate incorrect code.
- No longer generating constructors for abstract classes.
- No longer generating
protectedelements. - Fixed an issue where synthetic methods caused code generation to fail.
0.11.0 #
- No changes. Keep major version in sync with
package:jni.
0.10.1 #
- Added backticks to code references in doc comments.
0.10.0 #
- Added support for Kotlin's top-level functions and fields.
- Used
package:dart_flutter_team_lints.
0.9.3 #
- Fixed a bug where wrong argument types were generated for varargs.
- Fixed the macOS arm64 varargs issue caused by the previous release.
- Support throwing Java exceptions from Dart code. (#1209)
0.9.2 #
- Fixed a bug where wrong argument types were generated for 32-bit architectures. This temporarily breaks generated bindings for macOS arm64, until the fix is cherry-picked on Dart stable.
0.9.1 #
- Fixed a bug in summarizer where standard output would use the default encoding of the operating system and therefore breaking the UTF-8 decoding for some locales.
0.9.0 #
- Breaking Change (#660): Removed C-based bindings. Now all bindings are Dart-only.
- Expanded constraint on
package:cli_configto allow^0.2.0. - Ignored
use_super_parameterslint in generated files. - Fixed a bug in summarizer and improved the display of errors.
0.8.0 #
- Breaking Change (#981):
fromRefis nowfromReference, and it gets aJReferenceinstead of aPointer<Void>.- Check out the internal changes to
JObjectinpackage:jni's changelog.
- Breaking Change: The generated impl class for interfaces is now an
interface. - Breaking Change (#792]):
static final Stringfields get converted toJStringgetters instead ofstatic const Stringfields in Dart. - Fixed a bug where a package would either be searched from sources or classes but not both.
- Fixed a bug where
<clinit>(class initialization method) which is not necessary to be exposed was generated.
0.7.0 #
- Breaking Change (#563):
Added
JBufferandJByteBufferclasses as default classes forjava.nio.Bufferandjava.nio.ByteBufferrespectively. - Breaking Change: Made the type classes
final. - Added
ignore_for_file: lines_longer_than_80_charsto the generated file preamble. - Added an explicit cast in generated
<Interface>.implementcode to allowdart analyzeto pass whenstrict-castsis set.
0.6.0 #
- Breaking Change (#707):
Renamed
delete*torelease*. - Breaking Change (#585):
Renamed constructors from
ctor1,ctor2, ... tonew1,new2, ... - Breaking Change: Specifying a class always pulls in nested classes by default. If a nested class is specified in config, it will be an error.
- Breaking Change: Removed
suspend_fun_to_asyncflag from the config. It's now happening by default since we read the Kotlin's metadata and reliably identify thesuspend funs. - Fixed a bug where the nested classes would be generated incorrectly depending on the backend used for generation.
- Fixed a bug where ASM backend would produce the incorrect parent for multi-level nested classes.
- Fixed a bug where the backends would produce different descriptors for the same method.
- Added
enable_experimentoption to config. - Created an experiment called
interface_implementationwhich creates a.implementmethod for interfaces, so you can implement them using Dart. - Save all
jnigenlogs to a file in.dart_tool/jnigen/logs/. This is useful for debugging.
0.5.0 #
- Breaking Change (#746):
Removed support for
importMapin favor of the newly added interop mechanism with importing yaml files. - Breaking Change (#746):
java.util.Set,java.util.Map,java.util.List,java.util.Iteratorand the boxed types likejava.lang.Integer,java.lang.Double, ... will be generated as their corresponding classes inpackage:jni. - Strings now use UTF16.
0.4.0 #
- Breaking Change (#705): Type arguments are now named instead of positional.
- Type parameters can now be inferred when possible.
- Fixed a bug where passing a
longargument truncated it tointin pure dart bindings. - Removed array extensions from the generated code.
- Added the ability to use source dependencies from Gradle.
- Fixed an issue with the field setter.
- Fixed an issue where exceptions were not properly thrown in pure Dart bindings.
0.3.0 #
- Added the option to convert Kotlin
suspend funto Dart async methods. Addsuspend_fun_to_async: truetojnigen.yaml.
0.2.0 #
- Support generating bindings for generics.
0.1.1 #
- Windows support for running tests and examples on development machines.
0.1.0 #
- Initial version: Basic bindings generation, maven and android utilities