Releases: gershnik/SimpleJNI
Releases · gershnik/SimpleJNI
Release list
3.17
Native Code
java_string_createin C++17 mode now acceptsstd::basic_string_viewof compatible
char types, not juststd::string. (In C++20 mode it continues to accept any
contiguous range)java_string_get_regionnow supportschar16_tdestination in addition tojcharjava_string_get_regionnow works with C++20 ranges as its destination. (This was
promised in the wiki but never actually implemented).java_exception::translatenow actually properly passes throughjava_exception
itself. It was always promised on the wiki but wasn't actually implemented. If your
code currently relies oncatch(java_exception &)to just re-raise it, you can
drop thatcatchand safely rely onjava_exception::translateof a general
std::exceptionto do it now.java_string_accessmove constructor now actually works.java_direct_buffer::at()is no longer erroneously marked noexcept.- Comparison operators on
java_array::const_iteratornow actually work. - Internal
va_listhandling 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
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
Annotation processors
- Updated dependencies
- KSP code generator is now built with KSP 2.3.3
3.14
Native Code
- Made CMake machinery survive (with a warning) invalid directories passed in
JNI_INCLUDE_DIRSfrom 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
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
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_TESTSthat 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
Native Code
java_string_createnow has overloads that acceptchar8_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::spanetc.)java_string_accessis now movablejava_string_accessgained more vector-like methods:cbegin,cend,rbegin,rend,crbegin,crend,data,empty,at,frontandback.java_array_accessis now properly movablejava_array_access::at()is no longer erroneously markednoexcept- Under C++20,
java_array_accessnow properly satisfiesstd::ranges::contiguous_rangeconcept for arrays of primitive types andstd::ranges::random_access_rangefor arrays of objects. - Various bug fixes for
java_array_accessiterator methods - Under C++20,
java_array_createfor primitive array types now accepts any input range as source - Under C++20,
java_array_get_regionandjava_array_get_regionnow 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
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_frameis now movable- Headers now correctly check for C++17 rather than C++14
Annotation processors
- No changes
3.9
Native Code
- No changes
Annotation processors
- You can now use
@CalledByNativeannotation on Java/Kotlinenummembers. - Kotlin version required updated to 1.9.23
- KSP code generator now requires KSP version 1.9.23-1.0.20
3.8
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