Cron.parseAndBuild does not properly resolve for JS and Native
It resolves properly for android and jvm
But on JS and Native, it says it "requires dependency" on the core module.
Depending directly on the core module fixes this. But I imagine this is unintended?
Thank you for highlighting a problem.
Do you use the last version 0.10.5 in both cases?
So, I tested the library for mingwX64:
plugins {
kotlin("multiplatform") version "1.9.23"
}
repositories {
mavenCentral()
}
kotlin {
mingwX64 {
binaries.executable()
}
sourceSets {
val mingwX64Main by getting {
dependencies {
implementation("com.ucasoft.kcron:kcron-common:0.10.5")
}
}
}
}
import com.ucasoft.kcron.Cron
fun main() {
println(Cron.parseAndBuild("* 12 ? * *").expression)
}
Works as expected. You don't need core module here.
Could you confirm or clarify?
I am using kotlin version 2.0.0-Beta4 with JS and macosarm64. Maybe the issue only happens in those contexts?
I reproduced it like this:
plugins {
kotlin("multiplatform") version("2.0.0-Beta4")
}
kotlin {
jvm()
macosArm64()
js {
browser()
}
}
repositories {
mavenCentral()
}
dependencies {
val dep = "com.ucasoft.kcron:kcron-common:0.10.5"
add("commonMainImplementation",dep)
}
JS Module
import com.ucasoft.kcron.Cron
fun main() {
println(Cron.parseAndBuild("* 12 ? * *").expression)
}
Cannot access class 'com.ucasoft.kcron.core.builders.Builder'. Check your module classpath for missing or conflicting dependencies.
Yes, I can confirm that with Kotlin 2.0.0-Beta4 version there is the issue.
Looks like it has problem with dependencies resolving. I will create a ticket on JetBrains board.
Thank you!
Here is a link on JetBrains board: KT-66707 Dependency library cannot be resolved
Great, thank you again for creating the YouTrack issue!
Hello @mgroth0! I just released new version of Kcron - 0.13.2 The issue is fixed via workaround, so I don't close the issue until KT-66707 is not closed.