Disable javadoc generation on local development
Currently Dokka tasks running for Gradle plugins take quite a lot of time slowing down local development cycle. This change disables publishing javadoc on non-CI builds. This could be lifted by putting 'kotlin.build.gradle.publish.javadocs=true' into local.properties. ^KT-49227 In Progress
This commit is contained in:
@@ -51,3 +51,6 @@ val KotlinBuildProperties.isNativeRuntimeDebugInfoEnabled: Boolean
|
||||
|
||||
val KotlinBuildProperties.junit5NumberOfThreadsForParallelExecution: Int?
|
||||
get() = (getOrNull("kotlin.test.junit5.maxParallelForks") as? String)?.toInt()
|
||||
|
||||
val KotlinBuildProperties.publishGradlePluginsJavadoc: Boolean
|
||||
get() = getBoolean("kotlin.build.gradle.publish.javadocs", false)
|
||||
|
||||
@@ -100,7 +100,13 @@ fun Project.configureGradlePluginCommonSettings() {
|
||||
.extensions
|
||||
.configure<JavaPluginExtension> {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
// Enabling publishing docs jars only on CI build
|
||||
// Currently dokka task runs non-incrementally and takes big amount of time
|
||||
if (kotlinBuildProperties.publishGradlePluginsJavadoc ||
|
||||
kotlinBuildProperties.isTeamcityBuild
|
||||
) {
|
||||
withJavadocJar()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,4 +169,4 @@ fun Project.publishShadowedJar(
|
||||
add(sourceSet.apiElementsConfigurationName, shadowJarTask)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user