gradle-kmp-configuration-plugin 0.5.1 is out
#shipcode
https://github.com/05nelsonm/gradle-kmp-configuration-plugin
Matt Nelson
_@matthewnelson.io
npub1j3fs...7lq8
Navy -> NASA -> Sphinx Chat -> Strike -> FLOSS
PGP: 0x61471B8AB3890961
Kotlin Multiplatform and C are the way
Notes (7)
Trying to add support for WasmJs to kmp-tor, but there's a nasty bug in the Kotlin Gradle Plugin. Have to wait for Kotlin 2.2.0 😓
FED hasn't even turned on their monopoly money printers yet...
Looking forward to my weekly dose of nostr:nprofile1qqs879mhq6kkuzh2wk57xdzanl76uem8d7hlyjd7v4a4jcm4u88d8ygprpmhxue69uhhqun9d45h2mfwwpexjmtpdshxuet5qydhwumn8ghj7un9d3shjtnzd96xxmmfdecxzunt9e3k7mgxzfkn5 today
Spent the day working on a complete overhaul of kmp-file's API.
This new API will be highly focused file/directory permissions and atomic filesystem operations.
Unfortunately, permissions have always taken a back seat when it comes to Kotlin IO libraries, even in Java. The API is cumbersome and you always have to check if you're on Windows (not POSIX) lest you forget and crash. Additionally, Java's nio API is not available for Android API 25 and below which makes it difficult to come up with a simple to use API.
BUT! Android API 21 introduced the Os and OsConstants classes with access to all the native APIs. With some magic (reflection b/c kmp-file is JVM only), one can have the best of both worlds.
I hope to make permissions a key part of the API, forcing the API consumer to always have to express SOMETHING (null for default dir/file permissions).
API for all platforms will look something akin to:
"/some/path/to/file.text".toFile().writeUtf8(text = "Hello World", mode = "644", mustCreate = true)
"/some/path/to/dir".toFile().mkdirs2(mode = " 744").resolve("new.txt").writeBytes(data = "Hello World!".encodeToByteArray(), mode = null)
How in the world do people use Windows??? This is atrocious 😂
Kicking myself.
Released a new version of kmp-process just 2 days ago, and just yesterday found several bugs with the Kotlin/Native implementation.
Spent the day fixing them, but man...
https://github.com/05nelsonm/kmp-process