Fixed jvm build
This commit is contained in:
parent
ae7d31bd30
commit
9d19dc7159
@ -52,7 +52,6 @@ open class ScientifikJVMPlugin : Plugin<Project> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -194,6 +194,12 @@ open class ScientifikPublishPlugin : Plugin<Project> {
|
|||||||
|
|
||||||
|
|
||||||
extensions.findByType<KotlinJvmProjectExtension>()?.apply {
|
extensions.findByType<KotlinJvmProjectExtension>()?.apply {
|
||||||
|
|
||||||
|
val sourcesJar by tasks.registering(Jar::class) {
|
||||||
|
archiveClassifier.set("sources")
|
||||||
|
from(sourceSets["main"].kotlin.srcDirs.first())
|
||||||
|
}
|
||||||
|
|
||||||
val dokka by tasks.getting(DokkaTask::class) {
|
val dokka by tasks.getting(DokkaTask::class) {
|
||||||
outputFormat = "html"
|
outputFormat = "html"
|
||||||
outputDirectory = "$buildDir/javadoc"
|
outputDirectory = "$buildDir/javadoc"
|
||||||
@ -208,8 +214,12 @@ open class ScientifikPublishPlugin : Plugin<Project> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure<PublishingExtension> {
|
configure<PublishingExtension> {
|
||||||
publications.filterIsInstance<MavenPublication>().forEach { publication ->
|
publications {
|
||||||
publication.artifact(kdocJar.get())
|
register("jvm", MavenPublication::class) {
|
||||||
|
from(components["java"])
|
||||||
|
artifact(sourcesJar.get())
|
||||||
|
artifact(kdocJar.get())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user