File tree Expand file tree Collapse file tree
buildSrc/src/main/kotlin/org/jetbrains Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import org.jetbrains.ValidatePublications
2- import org.jetbrains.configureDokkaVersion
1+ import org.jetbrains.*
32import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
4- import org.jetbrains.publicationChannels
53
64plugins {
75 kotlin(" jvm" ) apply false
@@ -64,9 +62,11 @@ subprojects {
6462 }
6563
6664 register<Jar >(" javadocJar" ) {
67- dependsOn(dokkaHtml)
6865 archiveClassifier.set(" javadoc" )
69- from(dokkaOutputDir)
66+ if (isLocalPublication) {
67+ dependsOn(dokkaHtml)
68+ from(dokkaOutputDir)
69+ }
7070 }
7171 }
7272}
Original file line number Diff line number Diff line change 11package org.jetbrains
22
3+ import org.gradle.api.Project
34import org.gradle.api.Task
45
56fun Task.dependsOnMavenLocalPublication () {
@@ -11,3 +12,6 @@ fun Task.dependsOnMavenLocalPublication() {
1112 }
1213 }
1314}
15+
16+ val Project .isLocalPublication: Boolean
17+ get() = gradle.startParameter.taskNames.contains(" publishToMavenLocal" )
You can’t perform that action at this time.
0 commit comments