From 623a019ef804dc1d6f2bba5d4dcd95b85b9ac023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Mon, 23 Mar 2020 12:58:39 +0100 Subject: [PATCH] Upgrade to Dokka 0.10.1 Closes gh-24764 --- build.gradle | 2 +- gradle/docs.gradle | 57 ++++++++++++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/build.gradle b/build.gradle index 60684ce841..8d7934b004 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'io.spring.dependency-management' version '1.0.8.RELEASE' apply false id 'org.jetbrains.kotlin.jvm' version '1.3.70' apply false - id 'org.jetbrains.dokka' version '0.9.18' apply false + id 'org.jetbrains.dokka' version '0.10.1' apply false id 'org.asciidoctor.jvm.convert' version '2.4.0' id 'io.spring.gradle-enterprise-conventions' version '0.0.2' id 'io.spring.nohttp' version '0.0.4.RELEASE' diff --git a/gradle/docs.gradle b/gradle/docs.gradle index 7065153aa3..8ffa7f0ef8 100644 --- a/gradle/docs.gradle +++ b/gradle/docs.gradle @@ -65,34 +65,47 @@ dokka { dependsOn { tasks.getByName("api") } + doFirst { - classpath = moduleProjects.collect { project -> project.jar.outputs.files.getFiles() }.flatten() - classpath += files(moduleProjects.collect { it.sourceSets.main.compileClasspath }) - sourceDirs = files(moduleProjects - .findAll { - it.pluginManager.hasPlugin("kotlin") + configuration { + classpath = moduleProjects.collect { project -> project.jar.outputs.files.getFiles() }.flatten() + classpath += files(moduleProjects.collect { it.sourceSets.main.compileClasspath }) + + moduleProjects.findAll { + it.pluginManager.hasPlugin("kotlin") + }.each { project -> + def kotlinDirs = project.sourceSets.main.kotlin.srcDirs.collect() + kotlinDirs -= project.sourceSets.main.java.srcDirs + kotlinDirs.each { dir -> + if (dir.exists()) { + sourceRoot { + path = dir.path + } + } } - .collect { project -> - def kotlinDirs = project.sourceSets.main.kotlin.srcDirs.collect() - kotlinDirs -= project.sourceSets.main.java.srcDirs - }) + } + } } - moduleName = "spring-framework" + outputFormat = "html" outputDirectory = "$buildDir/docs/kdoc" - externalDocumentationLink { - url = new URL("https://docs.spring.io/spring-framework/docs/$version/javadoc-api/") - packageListUrl = new File(buildDir, "docs/javadoc/package-list").toURI().toURL() - } - externalDocumentationLink { - url = new URL("https://projectreactor.io/docs/core/release/api/") - } - externalDocumentationLink { - url = new URL("https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/") - } - externalDocumentationLink { - url = new URL("https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/") + configuration { + moduleName = "spring-framework" + + externalDocumentationLink { + url = new URL("https://docs.spring.io/spring-framework/docs/$version/javadoc-api/") + packageListUrl = new File(buildDir, "docs/javadoc/package-list").toURI().toURL() + } + externalDocumentationLink { + url = new URL("https://projectreactor.io/docs/core/release/api/") + } + externalDocumentationLink { + url = new URL("https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/") + } + externalDocumentationLink { + url = new URL("https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/") + } } }