https://kotlinlang.org logo
#kotlinx-datetime
Title
# kotlinx-datetime
s

Sterling Albury

03/09/2023, 7:24 PM
I'm trying to use kotlinx datetime in KI but can't figure out the repository to use. has anyone used kotlinx datetime in KI? what repo should i point it to? I've tried a bunch of things but haven't figured out
b

Big Chungus

03/09/2023, 9:46 PM
Should be on maven central. Did you add -jvm artefact suffix though?
Kotlin scripting doesn't support gradle metadata
s

Sterling Albury

03/09/2023, 10:38 PM
this was my first time trying to reference a maven artifact with KI and tried a few urls but didn't find anything that worked. I'll try to add the -jvm option though
so the repo urls I've been trying are
<https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-datetime-jvm/0.4.0/>
and
<https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-datetime/0.4.0/>
. I don't see any errors but when I try to use
:dependsOn
, I get
Could not find artifact
errors (the artifact it lists looks weird, for example
DependencyResolutionException: Could not find artifact org.jetbrains.kotlinx:kotlinx-datetime-jvm:jar:0.4.0
.
b

Big Chungus

03/10/2023, 1:16 AM
Repo url is not artifact url. Try https://repo.maven.apache.org/maven2 And then dependsOn
org.jetbrains.kotlinx:kotlinx-datetime-jvm:0.4.0
s

Sterling Albury

03/10/2023, 2:15 AM
that works! thank you!
35 Views