无法启动依赖于公开库的新 kotlin 多平台库
Can not start new kotlin multiplatform library with dependency on exposed library
我想在我正在编写的 kotlin 多平台库中使用 jetbrains 公开库。我该怎么做呢?
我收到一个 gradle 构建错误,它无法找到它需要公开的所有内容。这是我的 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
}
我在构建日志中得到了这个
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)...
这个库只针对 jvm,因为你有本地目标,它与你的公共源集不兼容
我想在我正在编写的 kotlin 多平台库中使用 jetbrains 公开库。我该怎么做呢? 我收到一个 gradle 构建错误,它无法找到它需要公开的所有内容。这是我的 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
}
我在构建日志中得到了这个
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)...
这个库只针对 jvm,因为你有本地目标,它与你的公共源集不兼容