diff --git a/build.gradle.kts b/build.gradle.kts index 237100e..2375d93 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,9 +16,11 @@ description = "Build tools for DataForge and kscience projects" repositories { gradlePluginPortal() jcenter() + maven("https://repo.kotlin.link") maven("https://kotlin.bintray.com/kotlinx") maven("https://dl.bintray.com/kotlin/kotlin-eap") maven("https://dl.bintray.com/kotlin/kotlin-dev") + } val kotlinVersion = "1.4.30" @@ -33,7 +35,7 @@ dependencies { implementation("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion") implementation("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.15.1") implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.4.20") - implementation("org.jetbrains.dokka:dokka-base:1.4.20") +// implementation("org.jetbrains.dokka:dokka-base:1.4.20") implementation("org.jetbrains.intellij.plugins:gradle-changelog-plugin:1.0.0") implementation("org.jetbrains.kotlinx:binary-compatibility-validator:0.4.0") } @@ -195,7 +197,7 @@ publishing { } } signing { - useGpgCmd() + //useGpgCmd() sign(publications) } } diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KSciencePublishPlugin.kt b/src/main/kotlin/ru/mipt/npm/gradle/KSciencePublishPlugin.kt index 3558c99..5c34659 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KSciencePublishPlugin.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KSciencePublishPlugin.kt @@ -14,7 +14,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension open class KSciencePublishPlugin : Plugin { override fun apply(project: Project): Unit = project.plugins.withId("ru.mipt.npm.kscience") { - project.run { + project.afterEvaluate { if (plugins.findPlugin("maven-publish") == null) { plugins.apply("maven-publish") } @@ -29,6 +29,7 @@ open class KSciencePublishPlugin : Plugin { // return // } + project.configure { plugins.withId("org.jetbrains.kotlin.js") { val kotlin = extensions.findByType()!! @@ -62,9 +63,15 @@ open class KSciencePublishPlugin : Plugin { } } + val dokkaJar: Jar by tasks.creating(Jar::class) { + group = "documentation" + archiveClassifier.set("javadoc") + from(tasks.findByName("dokkaHtml")) + } // Process each publication we have in this project publications.withType().forEach { publication -> + publication.artifact(dokkaJar) publication.pom { name.set(project.name) description.set(project.description) @@ -177,7 +184,7 @@ open class KSciencePublishPlugin : Plugin { } extensions.findByType()?.apply { - useGpgCmd() + //useGpgCmd() sign(publications) }