@@ -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.1.0'
21+ id ' org.jetbrains.dokka' version ' 2.1.0' apply false
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
@@ -410,23 +410,25 @@ configure(javaProjects) { subproject ->
410410 }
411411
412412 // Process only the modules that require kotlin docs
413- apply plugin : ' org.jetbrains.dokka'
414- dokka {
415- dokkaPublications. html {
416- outputDirectory. set(file(rootProject. layout. buildDirectory. dir(' kdoc' )))
417- }
418- dokkaSourceSets. configureEach {
419- sourceRoots. setFrom(file(' src/main/kotlin' ))
420- classpath. from(sourceSets[' main' ]. runtimeClasspath)
421- externalDocumentationLinks. register(" spring-integration-api" ) {
422- url. set(uri(" https://docs.spring.io/spring-integration/docs/$version /api/" ))
423- packageListUrl. set(file(rootProject. layout. buildDirectory. file(' docs/javadoc/element-list' )). toURI())
424- }
425- externalDocumentationLinks. register(" reactor-core" ) {
426- url. set(uri(' https://projectreactor.io/docs/core/release/api/' ))
413+ if (file(' src/main/kotlin' )) {
414+ apply plugin : ' org.jetbrains.dokka'
415+ dokka {
416+ dokkaPublications. html {
417+ outputDirectory = rootProject. layout. buildDirectory. dir(' kdoc' )
427418 }
428- externalDocumentationLinks. register(" reactive-streams" ) {
429- url. set(uri(' https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/' ))
419+ dokkaSourceSets. configureEach {
420+ sourceRoots. setFrom(file(' src/main/kotlin' ))
421+ classpath. from(sourceSets[' main' ]. runtimeClasspath)
422+ externalDocumentationLinks. register(" spring-integration-api" ) {
423+ url. set(uri(" https://docs.spring.io/spring-integration/docs/$version /api/" ))
424+ packageListUrl. set(file(rootProject. layout. buildDirectory. file(' docs/javadoc/element-list' )). toURI())
425+ }
426+ externalDocumentationLinks. register(" reactor-core" ) {
427+ url. set(uri(' https://projectreactor.io/docs/core/release/api/' ))
428+ }
429+ externalDocumentationLinks. register(" reactive-streams" ) {
430+ url. set(uri(' https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/' ))
431+ }
430432 }
431433 }
432434 }
@@ -1136,8 +1138,21 @@ tasks.register('schemaZip', Zip) {
11361138 }
11371139}
11381140
1141+ apply plugin : ' org.jetbrains.dokka'
1142+
1143+ dependencies {
1144+ dokka project(' :spring-integration-core' )
1145+ }
1146+
1147+ dokka {
1148+ moduleName = " spring-integration"
1149+ dokkaPublications. html {
1150+ outputDirectory = project. layout. buildDirectory. dir(' kdoc' )
1151+ }
1152+ }
1153+
11391154tasks. register(' docsZip' , Zip ) {
1140- dependsOn javaProjects . findAll { it . file( ' src/main/kotlin ' ) . exists() } . collect { " : ${ it.name } : dokkaGenerate" }
1155+ dependsOn ' dokkaGenerate'
11411156 group = ' Distribution'
11421157 archiveClassifier = ' docs'
11431158 description = " Builds -${ archiveClassifier} archive containing api and reference " +
0 commit comments