Skip to content

Releases: gershnik/SimpleJNI

3.17

Choose a tag to compare

@github-actions github-actions released this 28 May 09:19

Native Code

  • java_string_create in C++17 mode now accepts std::basic_string_view of compatible
    char types, not just std::string. (In C++20 mode it continues to accept any
    contiguous range)
  • java_string_get_region now supports char16_t destination in addition to jchar
  • java_string_get_region now works with C++20 ranges as its destination. (This was
    promised in the wiki but never actually implemented).
  • java_exception::translate now actually properly passes through java_exception
    itself. It was always promised on the wiki but wasn't actually implemented. If your
    code currently relies on catch(java_exception &) to just re-raise it, you can
    drop that catch and safely rely on java_exception::translate of a general
    std::exception to do it now.
  • java_string_access move constructor now actually works.
  • java_direct_buffer::at() is no longer erroneously marked noexcept.
  • Comparison operators on java_array::const_iterator now actually work.
  • Internal va_list handling when logging exceptions is now pedantically correct. (Unlikely
    to have been an issue anywhere.)

Annotation processors

  • KSP processor: fixed garbled generated class name for Kotlin files under certain rare conditions.
  • Updated dependencies
  • KSP code generator is now built with KSP 2.3.9

3.16

Choose a tag to compare

@github-actions github-actions released this 27 Apr 09:48

Annotation processors

  • KSP processor no longer generates bogus native stubs for classes passed via expose.extra parameter. See #4
  • Updated dependencies
  • KSP code generator is now built with KSP 2.3.7

3.15

Choose a tag to compare

@github-actions github-actions released this 08 Dec 07:29

Annotation processors

  • Updated dependencies
  • KSP code generator is now built with KSP 2.3.3

3.14

Choose a tag to compare

@github-actions github-actions released this 20 Jul 06:14

Native Code

  • Made CMake machinery survive (with a warning) invalid directories passed in JNI_INCLUDE_DIRS from outside (#3)
  • Made CMake installed package not hardcode JNI headers paths used at buildtime but rather detect them in the same way
    subdirectory build does.

Annotation processors

  • Updated dependencies
  • KSP code generator is now built with KSP 2.2.0-2.0.2.

3.13

Choose a tag to compare

@github-actions github-actions released this 18 May 21:13

Native Code

  • Added missing header when compiling with GCC is C++23 mode
  • CMake minimum required version is now 3.10

Annotation processors

  • Updated dependencies
  • KSP code generator is now built with KSP 2.1.21-2.0.1. This seems
    to work fine with older Kotlin/KSP versions but if you experience any
    issues upgrading KSP might be necessary.

3.12

Choose a tag to compare

@github-actions github-actions released this 17 Feb 09:52

Native Code

  • CMake build now support installation (cmake --install ...)
  • Test targets are no longer part of default ('all') target
  • There is a new Cmake option SMJNI_NO_TESTS that suppresses all test related functionality

Annotation processors

  • Kotlin version required updated to 1.9.25
  • KSP code generator now requires KSP version 1.9.25-1.0.20

3.11

Choose a tag to compare

@github-actions github-actions released this 30 Aug 10:41

Native Code

  • java_string_create now has overloads that accept char8_t *, (char8_t *, size_t), char16_t *, (char16_t *, size_t) and, under C++20, any contiguous range of these types (e.g. std::vector, std::string_view, std::span etc.)
  • java_string_access is now movable
  • java_string_access gained more vector-like methods: cbegin, cend, rbegin, rend, crbegin, crend, data, empty, at, front and back.
  • java_array_access is now properly movable
  • java_array_access::at() is no longer erroneously marked noexcept
  • Under C++20, java_array_access now properly satisfies std::ranges::contiguous_range concept for arrays of primitive types and std::ranges::random_access_range for arrays of objects.
  • Various bug fixes for java_array_access iterator methods
  • Under C++20, java_array_create for primitive array types now accepts any input range as source
  • Under C++20, java_array_get_region and java_array_get_region now accept any contiguous ranges as source/destination

Annotation processors

  • Kotlin version required updated to 1.9.24
  • KSP code generator now requires KSP version 1.9.24-1.0.20

3.10

Choose a tag to compare

@github-actions github-actions released this 10 May 06:55

Native Code

  • java_string_create(JNIEnv *, const char *, size_t) exposed publicly (thank you @JonathanLennox)
  • Reduced amount of allocations during exception message extraction
  • Reduced amount and complexity of template instanciations during compilation
  • java_frame is now movable
  • Headers now correctly check for C++17 rather than C++14

Annotation processors

  • No changes

3.9

3.9

Choose a tag to compare

@github-actions github-actions released this 03 May 19:30

Native Code

  • No changes

Annotation processors

  • You can now use @CalledByNative annotation on Java/Kotlin enum members.
  • Kotlin version required updated to 1.9.23
  • KSP code generator now requires KSP version 1.9.23-1.0.20

3.8

3.8

Choose a tag to compare

@github-actions github-actions released this 06 Nov 08:50

Native Code

  • Added missing standard library includes not implicitly included on some compilers
  • Modernized CMake file somewhat

Annotation processors

  • Kotlin version required updated to 1.9.0
  • KSP code generator now requires KSP version 1.9.0-1.0.13