Browse Source

Polish Gradle upgrade

Closes gh-26870
pull/27415/head
Brian Clozel 4 years ago
parent
commit
ca34d0cce8
  1. 9
      build.gradle
  2. 48
      gradle/docs-dokka.gradle
  3. 45
      gradle/docs.gradle

9
build.gradle

@ -3,8 +3,8 @@ plugins {
id 'io.spring.nohttp' version '0.0.5.RELEASE' id 'io.spring.nohttp' version '0.0.5.RELEASE'
id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false
id 'org.jetbrains.dokka' version '1.5.0' apply false id 'org.jetbrains.dokka' version '1.5.0' apply false
id 'org.asciidoctor.jvm.convert' version '3.1.0' id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'org.asciidoctor.jvm.pdf' version '3.1.0' id 'org.asciidoctor.jvm.pdf' version '3.3.2'
id 'de.undercouch.download' version '4.1.2' id 'de.undercouch.download' version '4.1.2'
id "io.freefair.aspectj" version '6.1.0' apply false id "io.freefair.aspectj" version '6.1.0' apply false
id "com.github.ben-manes.versions" version '0.39.0' id "com.github.ben-manes.versions" version '0.39.0'
@ -381,7 +381,10 @@ configure([rootProject] + javaProjects) { project ->
"https://hc.apache.org/httpcomponents-client-5.1.x/current/httpclient5/apidocs/", "https://hc.apache.org/httpcomponents-client-5.1.x/current/httpclient5/apidocs/",
"https://projectreactor.io/docs/test/release/api/", "https://projectreactor.io/docs/test/release/api/",
"https://junit.org/junit4/javadoc/4.13.2/", "https://junit.org/junit4/javadoc/4.13.2/",
"https://junit.org/junit5/docs/5.7.2/api/" "https://junit.org/junit5/docs/5.7.2/api/",
"https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/",
"https://javadoc.io/static/io.rsocket/rsocket-core/1.1.1/",
"https://r2dbc.io/spec/0.8.5.RELEASE/api/"
] as String[] ] as String[]
} }

48
gradle/docs-dokka.gradle

@ -2,29 +2,29 @@ tasks.findByName("dokkaHtmlPartial")?.configure {
outputDirectory.set(new File(buildDir, "docs/kdoc")) outputDirectory.set(new File(buildDir, "docs/kdoc"))
dokkaSourceSets { dokkaSourceSets {
configureEach { configureEach {
sourceRoots.setFrom(file("src/main/kotlin")) sourceRoots.setFrom(file("src/main/kotlin"))
classpath.from(sourceSets["main"].runtimeClasspath) classpath.from(sourceSets["main"].runtimeClasspath)
externalDocumentationLink { externalDocumentationLink {
url.set(new URL("https://docs.spring.io/spring-framework/docs/current/javadoc-api/")) url.set(new URL("https://docs.spring.io/spring-framework/docs/current/javadoc-api/"))
} }
externalDocumentationLink { externalDocumentationLink {
url.set(new URL("https://projectreactor.io/docs/core/release/api/")) url.set(new URL("https://projectreactor.io/docs/core/release/api/"))
} }
externalDocumentationLink { externalDocumentationLink {
url.set(new URL("https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/")) url.set(new URL("https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/"))
} }
externalDocumentationLink { externalDocumentationLink {
url.set(new URL("https://kotlin.github.io/kotlinx.coroutines/")) url.set(new URL("https://kotlin.github.io/kotlinx.coroutines/"))
} }
externalDocumentationLink { externalDocumentationLink {
url.set(new URL("http://hamcrest.org/JavaHamcrest/javadoc/2.1/")) url.set(new URL("http://hamcrest.org/JavaHamcrest/javadoc/2.1/"))
} }
externalDocumentationLink { externalDocumentationLink {
url.set(new URL("https://javadoc.io/doc/javax.servlet/javax.servlet-api/latest/")) url.set(new URL("https://javadoc.io/doc/javax.servlet/javax.servlet-api/latest/"))
} }
externalDocumentationLink { externalDocumentationLink {
url.set(new URL("https://javadoc.io/static/io.rsocket/rsocket-core/1.1.1/")) url.set(new URL("https://javadoc.io/static/io.rsocket/rsocket-core/1.1.1/"))
} }
} }
} }
} }

45
gradle/docs.gradle

@ -61,42 +61,15 @@ task api(type: Javadoc) {
/** /**
* Produce KDoc for all Spring Framework modules in "build/docs/kdoc" * Produce KDoc for all Spring Framework modules in "build/docs/kdoc"
*/ */
/* pluginManager.withPlugin("kotlin") {
moduleProjects.each { module -> tasks.dokkaHtmlMultiModule.configure {
dokkaHtmlPartial { dependsOn {
dokkaSourceSets { tasks.getByName("api")
configureEach {
externalDocumentationLink {
url.set(URL("https://docs.spring.io/spring-framework/docs/$version/javadoc-api/"))
packageListUrl = new File(buildDir, "docs/javadoc/package-list").toURI().toURL()
}
externalDocumentationLink {
url.set(URL("https://projectreactor.io/docs/core/release/api/"))
}
externalDocumentationLink {
url.set(URL("https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/"))
}
/*
This link causes errors, removing to fix the build.
externalDocumentationLink {
url.set(URL("https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/"))
}
//
externalDocumentationLink {
url.set(URL("https://r2dbc.io/spec/0.8.3.RELEASE/api/"))
}
}
} }
moduleName.set("spring-framework")
outputDirectory.set(project.file("$buildDir/docs/kdoc"))
} }
} }
*/
tasks.dokkaHtmlMultiModule.configure {
dependsOn {
tasks.getByName("api")
}
moduleName.set("spring-framework")
outputDirectory.set(project.file("$buildDir/docs/kdoc"))
}
task downloadResources(type: Download) { task downloadResources(type: Download) {
def version = "0.2.5" def version = "0.2.5"
@ -195,7 +168,7 @@ task docsZip(type: Zip, dependsOn: ['api', 'asciidoctor', 'asciidoctorPdf', 'dok
from ("$asciidoctorPdf.outputDir") { from ("$asciidoctorPdf.outputDir") {
into "reference/pdf" into "reference/pdf"
} }
from (dokkaHtmlMultiModule) { from (dokkaHtmlMultiModule.outputDirectory) {
into "kdoc-api" into "kdoc-api"
} }
} }
@ -252,11 +225,11 @@ task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
expand(copyright: new Date().format("yyyy"), version: project.version) expand(copyright: new Date().format("yyyy"), version: project.version)
} }
from(zipTree(docsZip.archivePath)) { from(zipTree(docsZip.archiveFile)) {
into "${baseDir}/docs" into "${baseDir}/docs"
} }
from(zipTree(schemaZip.archivePath)) { from(zipTree(schemaZip.archiveFile)) {
into "${baseDir}/schema" into "${baseDir}/schema"
} }

Loading…
Cancel
Save