andylamax
11/22/2020, 8:48 PMplugins { kotlin("js") }
val sourcesJarTaskProvider = tasks.register("sourcesJar", Jar::class.java) {
archiveClassifier.set("sources")
val kotlin = extensions.findByType<KotlinJsProjectExtension>() ?: return@register
from(kotlin.sourceSets["main"].kotlin.srcDirs)
}
create<MavenPublication>("main") {
from(components["kotlin"])
artifact(sourcesJarTaskProvider.get())
}
Results in the following gradle error
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':publishMainPublicationToMavenLocal'.
> Cannot query the value of this property because it has no value available.
The error isn't descriptive as much, but it has to do with publishing. What am I doing wrong? All I need is to publish a pure js klib to maven centralVampire
11/23/2020, 2:40 AM-s
you get a stack trace showing you the exact line where it happens