Browse Source

Polish Gradle upgrade

Closes gh-26870
pull/27415/head
Brian Clozel 3 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 { @@ -3,8 +3,8 @@ plugins {
id 'io.spring.nohttp' version '0.0.5.RELEASE'
id 'org.jetbrains.kotlin.jvm' version '1.5.30' 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.pdf' version '3.1.0'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'org.asciidoctor.jvm.pdf' version '3.3.2'
id 'de.undercouch.download' version '4.1.2'
id "io.freefair.aspectj" version '6.1.0' apply false
id "com.github.ben-manes.versions" version '0.39.0'
@ -381,7 +381,10 @@ configure([rootProject] + javaProjects) { project -> @@ -381,7 +381,10 @@ configure([rootProject] + javaProjects) { project ->
"https://hc.apache.org/httpcomponents-client-5.1.x/current/httpclient5/apidocs/",
"https://projectreactor.io/docs/test/release/api/",
"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[]
}

48
gradle/docs-dokka.gradle

@ -2,29 +2,29 @@ tasks.findByName("dokkaHtmlPartial")?.configure { @@ -2,29 +2,29 @@ tasks.findByName("dokkaHtmlPartial")?.configure {
outputDirectory.set(new File(buildDir, "docs/kdoc"))
dokkaSourceSets {
configureEach {
sourceRoots.setFrom(file("src/main/kotlin"))
classpath.from(sourceSets["main"].runtimeClasspath)
externalDocumentationLink {
url.set(new URL("https://docs.spring.io/spring-framework/docs/current/javadoc-api/"))
}
externalDocumentationLink {
url.set(new URL("https://projectreactor.io/docs/core/release/api/"))
}
externalDocumentationLink {
url.set(new URL("https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/"))
}
externalDocumentationLink {
url.set(new URL("https://kotlin.github.io/kotlinx.coroutines/"))
}
externalDocumentationLink {
url.set(new URL("http://hamcrest.org/JavaHamcrest/javadoc/2.1/"))
}
externalDocumentationLink {
url.set(new URL("https://javadoc.io/doc/javax.servlet/javax.servlet-api/latest/"))
}
externalDocumentationLink {
url.set(new URL("https://javadoc.io/static/io.rsocket/rsocket-core/1.1.1/"))
}
}
sourceRoots.setFrom(file("src/main/kotlin"))
classpath.from(sourceSets["main"].runtimeClasspath)
externalDocumentationLink {
url.set(new URL("https://docs.spring.io/spring-framework/docs/current/javadoc-api/"))
}
externalDocumentationLink {
url.set(new URL("https://projectreactor.io/docs/core/release/api/"))
}
externalDocumentationLink {
url.set(new URL("https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/"))
}
externalDocumentationLink {
url.set(new URL("https://kotlin.github.io/kotlinx.coroutines/"))
}
externalDocumentationLink {
url.set(new URL("http://hamcrest.org/JavaHamcrest/javadoc/2.1/"))
}
externalDocumentationLink {
url.set(new URL("https://javadoc.io/doc/javax.servlet/javax.servlet-api/latest/"))
}
externalDocumentationLink {
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) { @@ -61,42 +61,15 @@ task api(type: Javadoc) {
/**
* Produce KDoc for all Spring Framework modules in "build/docs/kdoc"
*/
/*
moduleProjects.each { module ->
dokkaHtmlPartial {
dokkaSourceSets {
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/"))
}
}
pluginManager.withPlugin("kotlin") {
tasks.dokkaHtmlMultiModule.configure {
dependsOn {
tasks.getByName("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) {
def version = "0.2.5"
@ -195,7 +168,7 @@ task docsZip(type: Zip, dependsOn: ['api', 'asciidoctor', 'asciidoctorPdf', 'dok @@ -195,7 +168,7 @@ task docsZip(type: Zip, dependsOn: ['api', 'asciidoctor', 'asciidoctorPdf', 'dok
from ("$asciidoctorPdf.outputDir") {
into "reference/pdf"
}
from (dokkaHtmlMultiModule) {
from (dokkaHtmlMultiModule.outputDirectory) {
into "kdoc-api"
}
}
@ -252,11 +225,11 @@ task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) { @@ -252,11 +225,11 @@ task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
expand(copyright: new Date().format("yyyy"), version: project.version)
}
from(zipTree(docsZip.archivePath)) {
from(zipTree(docsZip.archiveFile)) {
into "${baseDir}/docs"
}
from(zipTree(schemaZip.archivePath)) {
from(zipTree(schemaZip.archiveFile)) {
into "${baseDir}/schema"
}

Loading…
Cancel
Save