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?
|
val KotlinBuildProperties.junit5NumberOfThreadsForParallelExecution: Int?
|
||||||
get() = (getOrNull("kotlin.test.junit5.maxParallelForks") as? String)?.toInt()
|
get() = (getOrNull("kotlin.test.junit5.maxParallelForks") as? String)?.toInt()
|
||||||
|
|
||||||
|
val KotlinBuildProperties.publishGradlePluginsJavadoc: Boolean
|
||||||
|
get() = getBoolean("kotlin.build.gradle.publish.javadocs", false)
|
||||||
|
|||||||
@@ -100,9 +100,15 @@ fun Project.configureGradlePluginCommonSettings() {
|
|||||||
.extensions
|
.extensions
|
||||||
.configure<JavaPluginExtension> {
|
.configure<JavaPluginExtension> {
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
|
// 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()
|
withJavadocJar()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
plugins.withId("org.jetbrains.dokka") {
|
plugins.withId("org.jetbrains.dokka") {
|
||||||
val dokkaTask = tasks.named<DokkaTask>("dokkaJavadoc")
|
val dokkaTask = tasks.named<DokkaTask>("dokkaJavadoc")
|
||||||
|
|||||||
Reference in New Issue
Block a user