viascom / nanoid-kotlin

Nano ID for Kotlin
Apache License 2.0
24 stars 3 forks source link

Made NanoId Multiplatform and using Kotlin Gradle DSL #14

Open HLCaptain opened 6 months ago

HLCaptain commented 6 months ago

Migrated Gradle build files to use the statically typed Kotlin Gradle DSL.

Using korlibs-crypto to provide SecureRandom for each platform. Implementations are based on top of:

May need to modify the PR build config to enable platforms explicitly and run tests on them.

closes #11

writtmeyer commented 5 months ago

I like this KMP change, but I think korlibs-crypto is now no longer standalone. Maybe replace it with one of these KMP alternatives?

HLCaptain commented 5 months ago

For crypto, I don't see SecureRandom implementation which this library is based upon. I think secure-random would be a great alternative, but as pointed out in this comment, we are aiming to build upon stable libraries and implementations, which I can't confidently say about secure-random. korlibs-crypto remains as the only stable and taken care of library for now in my opinion. But if the team is flexible enough, I can give secure-random a go.

HLCaptain commented 4 months ago

Opened up PR for review, as no direct feedback was given on the concern of using korlibs-crypto as a library providing SecureRandom. korlibs-crypto is standalone in a sense, that it has its own artifact, independent from other korlibs libraries.

itsmefox commented 2 months ago

I had a short look at this PR. I did a clean build publishJvmPublicationToMavenLocal, but there seems to be an issue with the build, as the jar does not contain any code.

CleanShot 2024-07-29 at 09 49 49@2x

Also, the artefact name for the jvm build gets changed to nanoid-jvm. We want this to stay for jvm as it is now: nanoid