New release is finished 🥳
I added some new features such as filter, onEach and fold and corrected some functions like mapNotNull, mapIndexedNotNull and toTuple. Unfortunately there are some breaking changes included with this update, but i'll give you a migration guide and an ai skill by the hand, to make the switch as easy as possible for you.
The Library can now also be downloaded via GitHub Packages. MavenCentral will maybe come in the future. 😎
I added a couple of new Koltin Multiplatform targets, so MultiFunctions can now be used on almost every possible target. Note for iOS native targets: Unfortunately Jitpack cannot build iOS native builds and it also don't allows to upload artefacts from other sources then their build runners. Due to that reason, if you target an iOS or any apple native application, you will need to use GitHub Packages as dependency source with gradle. sry 🙈
I hope you like the updates.
Regards Benny ✌️
Changelog
3.0.0
Breaking Changes
- The tuple factory function has been renamed from
joinToTuple(...)totoTuple(...). mapNotNullandmapIndexedNotNullnow match Kotlin standard library semantics: the transform is called for every tuple, and onlynulltransform results are removed.- The previous
mapNotNullbehavior, where tuples with all values set tonullwere skipped before transformation, now lives inmapAnyNotNullandmapIndexedAnyNotNull. - The published artifact should be consumed as
com.github.stupacki:multi-functions:3.0.0. - Native/iOS consumers must resolve the library from GitHub Packages for this release. JitPack does not publish the Kotlin/Native iOS artifacts for this project.
- Published targets changed as part of the Kotlin Multiplatform publishing update. Consumers should verify that their target is available before upgrading, especially if they depended on
macosX64in earlier releases.
Added
- Added tuple-unpacking
filter,onEach, andfoldextensions forPair,Triple,Quad,Penta,Hexa, andHeptaiterables. - Added lazy
Sequenceextensions for tuple-unpackingmap,mapNotNull,mapAnyNotNull,mapCheckNull,filter,onEach, andfold. - Added
mapAnyNotNullandmapIndexedAnyNotNullfor workflows that should skip only tuples where every value isnull. - Added Android, JVM, JS, WASM JS, WASM WASI, iOS, tvOS, watchOS, Linux, Windows, and Android Native publication coverage where supported by the build host.
- Added GitHub Packages publishing support for the multiplatform artifacts.
- Added external-consumer integration projects that verify published package resolution across JVM, Android, iOS, JS, WASM, and native consumers.
Changed
- Updated the build to Kotlin
2.3.21and Android Gradle Plugin9.2.1. - Switched Android publication setup to the Android Kotlin Multiplatform library plugin.
- Removed the explicit Kotlin standard library dependency from common source sets and now rely on the Kotlin plugin defaults.
- Simplified source and test filenames by removing the historical
Multiprefix. - Reworked
notNullinternals to use direct null checks instead of reified casts. - Refreshed README examples to document the current API names and null-handling behavior.
Fixed
- Fixed
mapNotNullandmapIndexedNotNullAPI semantics so they no longer skip all-null input tuples before calling the transform. - Fixed tuple model documentation for
Quad,Penta,Hexa, andHepta. - Fixed packaging and repository configuration so published GitHub Packages artifacts can be consumed from independent builds.
2.0.1
- Previous stable release.