Skip to content

Commit 123215f

Browse files
committed
Upgrade to Dokka 2.1.0
- Update `org.jetbrains.dokka` plugin from 2.0.0 to 2.1.0 - Remove Jackson 2.15.3 version resolution strategy workaround that was needed to avoid conflicts in Dokka 2.0.0 - Migrate from deprecated V1 tasks (`dokkaHtmlPartial`, `dokkaHtmlMultiModule`) to V2 API (`dokkaGeneratePublicationHtml`, `dokkaGenerate`) - Replace `dokkaSourceSets.main` configuration block with `dokkaSourceSets.configureEach` - Update `docsZip` task to depend on new `dokkaGeneratePublicationHtml` task and add explicit dependency on `:spring-integration-core:dokkaGenerate`
1 parent 3e61fcd commit 123215f

File tree

1 file changed

+20
-33
lines changed

1 file changed

+20
-33
lines changed

build.gradle

Lines changed: 20 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ plugins {
1818
id 'base'
1919
id 'io.spring.nohttp' version '0.0.11' apply false
2020
id 'io.spring.dependency-management' version '1.1.7'
21-
id 'org.jetbrains.dokka' version '2.0.0'
21+
id 'org.jetbrains.dokka' version '2.1.0'
2222
id 'org.antora' version '1.0.0'
2323
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
2424
id 'com.google.protobuf' version '0.9.5' apply false
@@ -178,15 +178,6 @@ allprojects {
178178

179179
}
180180

181-
// TODO Remove when Dokka 2.1.0 is released
182-
configurations.matching { it.name.startsWith('dokka') }.configureEach {
183-
resolutionStrategy.eachDependency {
184-
if (requested.group.startsWith('com.fasterxml.jackson')) {
185-
useVersion('2.15.3')
186-
}
187-
}
188-
}
189-
190181
}
191182

192183
configure(javaProjects) { subproject ->
@@ -520,24 +511,14 @@ project('spring-integration-core') {
520511
}
521512
}
522513

523-
dokkaHtmlPartial {
524-
outputDirectory.set(new File('build', 'kdoc'))
525-
dokkaSourceSets {
526-
main {
527-
sourceRoots.setFrom(file('src/main/kotlin'))
528-
classpath.from(sourceSets['main'].runtimeClasspath)
529-
noJdkLink.set(false)
530-
externalDocumentationLink {
531-
url.set(new URL("https://docs.spring.io/spring-integration/docs/$version/api/"))
532-
packageListUrl.set(file('build/docs/javadoc/element-list').toURI().toURL())
533-
}
534-
externalDocumentationLink {
535-
url.set(new URL('https://projectreactor.io/docs/core/release/api/'))
536-
}
537-
externalDocumentationLink {
538-
url.set(new URL('https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/'))
539-
}
540-
}
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)
541522
}
542523
}
543524

@@ -1107,10 +1088,15 @@ tasks.register('api') {
11071088
dependsOn javadoc
11081089
}
11091090

1110-
dokkaHtmlMultiModule {
1111-
dependsOn 'api'
1091+
dokka {
11121092
moduleName.set('spring-integration')
1113-
outputDirectory.set(file('build/kdoc'))
1093+
dokkaPublications.html {
1094+
outputDirectory.set(file('build/kdoc'))
1095+
}
1096+
}
1097+
1098+
tasks.named('dokkaGeneratePublicationHtml') {
1099+
dependsOn 'api'
11141100
}
11151101

11161102
apply from: "${rootDir}/gradle/docs.gradle"
@@ -1151,7 +1137,8 @@ tasks.register('schemaZip', Zip) {
11511137
}
11521138

11531139
tasks.register('docsZip', Zip) {
1154-
dependsOn 'dokkaHtmlMultiModule'
1140+
dependsOn 'dokkaGeneratePublicationHtml'
1141+
dependsOn ':spring-integration-core:dokkaGenerate'
11551142
group = 'Distribution'
11561143
archiveClassifier = 'docs'
11571144
description = "Builds -${archiveClassifier} archive containing api and reference " +
@@ -1165,7 +1152,7 @@ tasks.register('docsZip', Zip) {
11651152
into 'api'
11661153
}
11671154

1168-
from(dokkaHtmlMultiModule.outputDirectory) {
1155+
from(file('build/kdoc')) {
11691156
into 'kdoc-api'
11701157
}
11711158
}

0 commit comments

Comments
 (0)