Skip to content

Commit f9b5f6c

Browse files
committed
Rearrange build for docs
* Copy docs to the `$buildDir/reference` instead of `docs` to make `asciidoctor` tasks to calculate their UP-TO-DATE key properly * Generate `kdoc` outside the `docs` dir to not interfere with `asciidoctor`
1 parent da56586 commit f9b5f6c

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ project('spring-integration-core') {
565565
}
566566

567567
dokkaHtmlPartial {
568-
outputDirectory.set(new File(buildDir, 'docs/kdoc'))
568+
outputDirectory.set(new File(buildDir, 'kdoc'))
569569
dokkaSourceSets {
570570
main {
571571
sourceRoots.setFrom(file('src/main/kotlin'))
@@ -1164,7 +1164,7 @@ task api(type: Javadoc) {
11641164
dokkaHtmlMultiModule {
11651165
dependsOn api
11661166
moduleName.set('spring-integration')
1167-
outputDirectory.set(file("$buildDir/docs/kdoc"))
1167+
outputDirectory.set(file("$buildDir/kdoc"))
11681168
}
11691169

11701170
apply from: "${rootDir}/gradle/docs.gradle"

gradle/docs.gradle

+4-6
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ task checkAsciidocLinks {
5252
}
5353

5454
def observationInputDir = file('spring-integration-core/src/main/java/org/springframework/integration/support/management/observation').absolutePath
55-
def generatedDocsDir = file("$buildDir/docs/generated").absolutePath
55+
def generatedDocsDir = file("$buildDir/reference/generated").absolutePath
5656

5757
task generateObservabilityDocs(type: JavaExec) {
5858
inputs.dir(observationInputDir)
@@ -74,7 +74,7 @@ task filterMetricsDocsContent(type: Copy) {
7474
task prepareDocs(type: Copy) {
7575
dependsOn checkAsciidocLinks, filterMetricsDocsContent
7676
from 'src/reference/asciidoc'
77-
into "$buildDir/docs"
77+
into "$buildDir/reference"
7878
}
7979

8080
asciidoctorPdf {
@@ -88,8 +88,7 @@ asciidoctorPdf {
8888
baseDirFollowsSourceFile()
8989

9090
asciidoctorj {
91-
sourceDir "$buildDir/docs"
92-
inputs.dir(sourceDir)
91+
sourceDir "$buildDir/reference"
9392
sources {
9493
include 'index-single.adoc'
9594
}
@@ -115,8 +114,7 @@ asciidoctor {
115114
baseDirFollowsSourceFile()
116115

117116
configurations 'asciidoctorExtensions'
118-
sourceDir "$buildDir/docs"
119-
inputs.dir(sourceDir)
117+
sourceDir "$buildDir/reference"
120118
outputOptions {
121119
backends 'spring-html'
122120
}

0 commit comments

Comments
 (0)