Skip to content

Commit 7d25d2f

Browse files
committed
Restore external documentation links for Dokka
- Restore external documentation links in spring-integration-core's `dokkaSourceSets` using the new `externalDocumentationLinks. register()` API instead of deprecated `externalDocumentationLink` - Fix indentation of spring-integration-core's `dokka` configuration block to be properly scoped within the project - Remove redundant `noJdkLink.set(false)` setting (false is default) - Remove unnecessary root-level `dokka` configuration that was setting module name and output directory without effect - Remove unused `dokkaGeneratePublicationHtml` task dependency from `docsZip` as `dokkaGenerate` already handles the generation - Simplify dependency chain by relying solely on `:spring-integration-core:dokkaGenerate` - Use root project var to determine root - Move the out of core module This makes the dokka build available to all modules if necessary
1 parent 123215f commit 7d25d2f

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

build.gradle

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ configure(javaProjects) { subproject ->
188188
apply plugin: 'kotlin'
189189
apply plugin: 'kotlin-spring'
190190
apply plugin: 'io.spring.nullability'
191+
apply plugin: 'org.jetbrains.dokka'
192+
191193

192194
apply from: "${rootDir}/gradle/publish-maven.gradle"
193195

@@ -393,6 +395,27 @@ configure(javaProjects) { subproject ->
393395

394396
check.dependsOn checkClasspathForConflicts, javadoc
395397

398+
399+
dokka {
400+
dokkaPublications.html {
401+
outputDirectory.set(file(rootProject.layout.buildDirectory.file('kdoc')))
402+
}
403+
dokkaSourceSets.configureEach {
404+
sourceRoots.setFrom(file('src/main/kotlin'))
405+
classpath.from(sourceSets['main'].runtimeClasspath)
406+
externalDocumentationLinks.register("spring-integration-api") {
407+
url.set(uri("https://docs.spring.io/spring-integration/docs/$version/api/"))
408+
packageListUrl.set(file('build/docs/javadoc/element-list').toURI())
409+
}
410+
externalDocumentationLinks.register("reactor-core") {
411+
url.set(uri('https://projectreactor.io/docs/core/release/api/'))
412+
}
413+
externalDocumentationLinks.register("reactor-streams") {
414+
url.set(uri('https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/'))
415+
}
416+
}
417+
}
418+
396419
publishing {
397420
publications {
398421
mavenJava(MavenPublication) {
@@ -468,7 +491,6 @@ project('spring-integration-cassandra') {
468491
project('spring-integration-core') {
469492
description = 'Spring Integration Core'
470493

471-
apply plugin: 'org.jetbrains.dokka'
472494
apply plugin: 'com.google.protobuf'
473495

474496
dependencies {
@@ -511,17 +533,6 @@ project('spring-integration-core') {
511533
}
512534
}
513535

514-
dokka {
515-
dokkaPublications.html {
516-
outputDirectory.set(file('../build/kdoc'))
517-
}
518-
dokkaSourceSets.configureEach {
519-
noJdkLink.set(false)
520-
sourceRoots.setFrom(file('src/main/kotlin'))
521-
classpath.from(sourceSets['main'].runtimeClasspath)
522-
}
523-
}
524-
525536
protobuf {
526537
protoc {
527538
artifact = "com.google.protobuf:protoc:$protobufVersion"
@@ -1088,17 +1099,6 @@ tasks.register('api') {
10881099
dependsOn javadoc
10891100
}
10901101

1091-
dokka {
1092-
moduleName.set('spring-integration')
1093-
dokkaPublications.html {
1094-
outputDirectory.set(file('build/kdoc'))
1095-
}
1096-
}
1097-
1098-
tasks.named('dokkaGeneratePublicationHtml') {
1099-
dependsOn 'api'
1100-
}
1101-
11021102
apply from: "${rootDir}/gradle/docs.gradle"
11031103

11041104
tasks.register('schemaZip', Zip) {
@@ -1137,8 +1137,7 @@ tasks.register('schemaZip', Zip) {
11371137
}
11381138

11391139
tasks.register('docsZip', Zip) {
1140-
dependsOn 'dokkaGeneratePublicationHtml'
1141-
dependsOn ':spring-integration-core:dokkaGenerate'
1140+
dependsOn 'dokkaGenerate'
11421141
group = 'Distribution'
11431142
archiveClassifier = 'docs'
11441143
description = "Builds -${archiveClassifier} archive containing api and reference " +

0 commit comments

Comments
 (0)