Skip to content

Commit d2a3498

Browse files
committed
Limit Kotlin API docs to Kotlin code
Previously, the Kotlin API docs included Java APIs. This commit corrects this by suppressing all Dokkatoo source sets other than main (main in src/main/kotlin, javaMain is src/main/java). Dokkatoo is sensitive to the order in which plugins are applied. This commit adapts to the sensitivity by changing the order in which the Dokatoo and Kotlin JVM plugins are applied. This prevents the Dokatoo plugin for overwriting the configuration that's applied by our Kotlin conventions. Closes gh-47763
1 parent 083e203 commit d2a3498

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

buildSrc/src/main/java/org/springframework/boot/build/KotlinConventions.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ private void configureDokkatoo(Project project) {
9797
link.getPackageListUrl().set(URI.create(url + "/element-list"));
9898
});
9999
}
100+
else {
101+
sourceSet.getSuppress().set(true);
102+
}
100103
});
101104
}
102105

spring-boot-project/spring-boot-docs/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
import org.springframework.boot.build.docs.ConfigureJavadocLinks
1818

1919
plugins {
20+
id "org.jetbrains.kotlin.jvm"
2021
id "dev.adamko.dokkatoo-html"
2122
id "java"
2223
id "org.antora"
23-
id "org.jetbrains.kotlin.jvm"
2424
id "org.springframework.boot.aggregator"
2525
id "org.springframework.boot.antora-contributor"
2626
id "org.springframework.boot.antora-dependencies"

spring-boot-project/spring-boot-test/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
*/
1616

1717
plugins {
18+
id "org.jetbrains.kotlin.jvm"
1819
id "dev.adamko.dokkatoo-html"
1920
id "java-library"
20-
id "org.jetbrains.kotlin.jvm"
2121
id "org.springframework.boot.deployed"
2222
id "org.springframework.boot.optional-dependencies"
2323
}

spring-boot-project/spring-boot/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
*/
1616

1717
plugins {
18-
id "dev.adamko.dokkatoo-html"
19-
id "java-library"
20-
id "java-test-fixtures"
2118
id "org.jetbrains.kotlin.jvm"
19+
id "dev.adamko.dokkatoo-html"
2220
id "org.springframework.boot.configuration-properties"
2321
id "org.springframework.boot.deployed"
2422
id "org.springframework.boot.optional-dependencies"
23+
id "java-library"
24+
id "java-test-fixtures"
2525
}
2626

2727
description = "Spring Boot"

0 commit comments

Comments
 (0)