Reputation: 159
I want to use jetbrains exposed library in a kotlin multiplatform library I am writing. How do I do this? I am getting a gradle build error that it can not find everything it needs for exposed. Here is my gradle build
sourceSets {
val commonMain by getting {
dependencies {
implementation("org.jetbrains.exposed:exposed-core:0.34.1")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmMain by getting
val jvmTest by getting
val jsMain by getting
val jsTest by getting
val nativeMain by getting
val nativeTest by getting
}
and I get this in the build log
Failed building KotlinMPPGradleModel
org.gradle.internal.resolve.ArtifactNotFoundException: Could not find exposed-core-0.34.1-samplessources.jar (org.jetbrains.exposed:exposed-core:0.34.1).
Searched in the following locations:
https://repo.maven.apache.org/maven2/org/jetbrains/exposed/exposed-core/0.34.1/exposed-core-0.34.1-samplessources.jar
at org.gradle.internal.resolve.result.DefaultBuildableArtifactResolveResult.notFound(DefaultBuildableArtifactResolveResult.java:28)...
Upvotes: 3
Views: 927
Reputation: 7622
This library targets jvm only, since you have native targets it isn't compatible with your common source set
Upvotes: 2