Skip to content

Commit 1cfba04

Browse files
committed
Merge pull request #47706 from var4609
* gh-47706: Migrate from Dokkatoo to Dokka Closes gh-47706
2 parents 918892f + f84b17c commit 1cfba04

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

buildSrc/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ plugins {
1919
id "io.spring.javaformat" version "${javaFormatVersion}"
2020
id "checkstyle"
2121
id "eclipse"
22+
id "org.jetbrains.dokka" version "2.1.0"
2223
}
2324

2425
repositories {
@@ -51,7 +52,7 @@ dependencies {
5152
implementation("com.tngtech.archunit:archunit:1.4.1")
5253
implementation("commons-codec:commons-codec:${commonsCodecVersion}")
5354
implementation("de.undercouch.download:de.undercouch.download.gradle.plugin:5.5.0")
54-
implementation("dev.adamko.dokkatoo:dokkatoo-plugin:2.3.1")
55+
implementation("org.jetbrains.dokka:dokka-gradle-plugin:2.1.0")
5556
implementation("dev.detekt:detekt-gradle-plugin:2.0.0-alpha.0")
5657
implementation("io.spring.gradle.antora:spring-antora-plugin:0.0.1")
5758
implementation("io.spring.javaformat:spring-javaformat-gradle-plugin:${javaFormatVersion}")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ private void configureDependencyManagement(Project project) {
278278
configurations
279279
.matching((configuration) -> (configuration.getName().endsWith("Classpath")
280280
|| JavaPlugin.ANNOTATION_PROCESSOR_CONFIGURATION_NAME.equals(configuration.getName()))
281-
&& (!configuration.getName().contains("dokkatoo")))
281+
&& (!configuration.getName().contains("dokka")))
282282
.all((configuration) -> configuration.extendsFrom(dependencyManagement));
283283
Dependency springBootParent = project.getDependencies()
284284
.enforcedPlatform(project.getDependencies()

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818

1919
import java.net.URI;
2020

21-
import dev.adamko.dokkatoo.DokkatooExtension;
22-
import dev.adamko.dokkatoo.formats.DokkatooHtmlPlugin;
2321
import dev.detekt.gradle.Detekt;
2422
import dev.detekt.gradle.extensions.DetektExtension;
2523
import dev.detekt.gradle.plugin.DetektPlugin;
2624
import org.gradle.api.Project;
2725
import org.gradle.api.tasks.SourceSet;
2826
import org.gradle.api.tasks.SourceSetContainer;
27+
import org.jetbrains.dokka.gradle.DokkaExtension;
28+
import org.jetbrains.dokka.gradle.formats.DokkaHtmlPlugin;
2929
import org.jetbrains.kotlin.gradle.dsl.JvmTarget;
3030
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions;
3131
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion;
@@ -59,7 +59,7 @@ class KotlinConventions {
5959
void apply(Project project) {
6060
project.getPlugins().withId("org.jetbrains.kotlin.jvm", (plugin) -> {
6161
project.getTasks().withType(KotlinCompile.class, this::configure);
62-
project.getPlugins().withType(DokkatooHtmlPlugin.class, (dokkatooPlugin) -> configureDokkatoo(project));
62+
project.getPlugins().withType(DokkaHtmlPlugin.class, (dokkaPlugin) -> configureDokka(project));
6363
configureDetekt(project);
6464
});
6565
}
@@ -74,10 +74,9 @@ private void configure(KotlinCompile compile) {
7474
.addAll("-Xsuppress-version-warnings", "-Xannotation-default-target=param-property");
7575
}
7676

77-
private void configureDokkatoo(Project project) {
78-
DokkatooExtension dokkatoo = project.getExtensions().getByType(DokkatooExtension.class);
79-
dokkatoo.getVersions().getJetbrainsDokka().set("2.1.0");
80-
dokkatoo.getDokkatooSourceSets().configureEach((sourceSet) -> {
77+
private void configureDokka(Project project) {
78+
DokkaExtension dokka = project.getExtensions().getByType(DokkaExtension.class);
79+
dokka.getDokkaSourceSets().configureEach((sourceSet) -> {
8180
if (SourceSet.MAIN_SOURCE_SET_NAME.equals(sourceSet.getName())) {
8281
sourceSet.getSourceRoots().setFrom(project.file("src/main/kotlin"));
8382
sourceSet.getClasspath()

core/spring-boot/build.gradle

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

1717
plugins {
18-
id "dev.adamko.dokkatoo-html"
18+
id "org.jetbrains.dokka"
1919
id "java-library"
2020
id "java-test-fixtures"
2121
id "org.jetbrains.kotlin.jvm"

documentation/spring-boot-docs/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import org.springframework.boot.build.docs.ConfigureJavadocLinks
2121
import org.springframework.boot.build.optional.OptionalDependenciesPlugin
2222

2323
plugins {
24-
id "dev.adamko.dokkatoo-html"
24+
id "org.jetbrains.dokka"
2525
id "java"
2626
id "org.antora"
2727
id "org.jetbrains.kotlin.jvm"
@@ -85,8 +85,8 @@ plugins.withType(EclipsePlugin) {
8585
dependencies {
8686
compileOnly("org.hamcrest:hamcrest-core")
8787

88-
dokkatoo(project(path: ":core:spring-boot"))
89-
dokkatoo(project(path: ":module:spring-boot-resttestclient"))
88+
dokka(project(path: ":core:spring-boot"))
89+
dokka(project(path: ":module:spring-boot-resttestclient"))
9090

9191
implementation(project(path: ":cli:spring-boot-cli"))
9292
implementation(project(path: ":core:spring-boot-docker-compose"))
@@ -242,7 +242,7 @@ dependencies {
242242
testSlices(project(path: ":core:spring-boot-test-autoconfigure", configuration: "testSliceMetadata"))
243243
}
244244

245-
dokkatoo {
245+
dokka {
246246
moduleName.set("Spring Boot Kotlin API")
247247
}
248248

@@ -440,7 +440,7 @@ antoraContributions {
440440
from(aggregatedJavadoc) {
441441
into "java"
442442
}
443-
from(tasks.named("dokkatooGeneratePublicationHtml")) {
443+
from(tasks.named("dokkaGeneratePublicationHtml")) {
444444
into "kotlin"
445445
}
446446
}
@@ -507,8 +507,8 @@ antoraContributions {
507507
}
508508
}
509509

510-
dokkatoo {
511-
dokkatooPublications.configureEach {
512-
includes.from("src/docs/dokkatoo/dokka-overview.md")
510+
dokka {
511+
dokkaPublications.configureEach {
512+
includes.from("src/docs/dokka/dokka-overview.md")
513513
}
514514
}
File renamed without changes.

module/spring-boot-resttestclient/build.gradle

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

1717
plugins {
18-
id "dev.adamko.dokkatoo-html"
18+
id "org.jetbrains.dokka"
1919
id "java-library"
2020
id "org.jetbrains.kotlin.jvm"
2121
id "org.springframework.boot.auto-configuration"

0 commit comments

Comments
 (0)