-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add kotlinx-datetime module (#198) #351
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for the PR, but please use the MPP plugin to not be limited to JVM only. Also, don't add a hardcoded dependency to Clock.System to enable mocking.
|
||
kotlin.jvmToolchain(11) | ||
|
||
dependencies { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switch to commonSourceSet
allow("MIT") | ||
} | ||
|
||
publishing { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove, it's not needed with mpp
} | ||
} | ||
|
||
java { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove too
import kotlin.random.Random | ||
|
||
@UUIDExperimentalAPI | ||
public fun UUIDv7(random: Random = SecureRandom): UUID = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't hardcode Clock System, instead add an Instant parameter, this should be enough.
|
||
@Test | ||
fun testConversionInstant() { | ||
val timestamp = Clock.System.now() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use a hardcoded Instant
Do you want to modify the PR? Otherwise I can take it too. |
I can check to see if I find some time within the next week. But if you're quicker, feel free to take over the PR 👍 |
# Conflicts: # gradle/libs.versions.toml
# Conflicts: # gradle/libs.versions.toml
Fixes #198
Feel free to modify or decline