From 40ba68fffe44befc525dbdd42d47e6bd572b4495 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Thu, 14 Nov 2024 16:16:40 +0200 Subject: [PATCH 1/4] Remove the dependency of `dokkaGenerate` on `dokkaGenerateModule*` --- .../dokka-gradle-plugin/src/main/kotlin/DokkaBasePlugin.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dokka-runners/dokka-gradle-plugin/src/main/kotlin/DokkaBasePlugin.kt b/dokka-runners/dokka-gradle-plugin/src/main/kotlin/DokkaBasePlugin.kt index 40352ea197..84d83e56cd 100644 --- a/dokka-runners/dokka-gradle-plugin/src/main/kotlin/DokkaBasePlugin.kt +++ b/dokka-runners/dokka-gradle-plugin/src/main/kotlin/DokkaBasePlugin.kt @@ -28,10 +28,7 @@ import org.jetbrains.dokka.gradle.engine.parameters.DokkaSourceSetSpec import org.jetbrains.dokka.gradle.engine.parameters.KotlinPlatform import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier import org.jetbrains.dokka.gradle.internal.* -import org.jetbrains.dokka.gradle.tasks.DokkaBaseTask -import org.jetbrains.dokka.gradle.tasks.DokkaGenerateModuleTask -import org.jetbrains.dokka.gradle.tasks.DokkaGenerateTask -import org.jetbrains.dokka.gradle.tasks.TaskNames +import org.jetbrains.dokka.gradle.tasks.* import java.io.File import javax.inject.Inject @@ -268,7 +265,7 @@ constructor( ) { target.tasks.register(taskNames.generate) { description = "Generates Dokka publications for all formats" - dependsOn(target.tasks.withType()) + dependsOn(target.tasks.withType()) } target.tasks.withType().configureEach { From 10cc48010f6898e0f2d8fba3d0d81aba0ceb81a8 Mon Sep 17 00:00:00 2001 From: Adam Semenenko <152864218+adam-enko@users.noreply.github.com> Date: Thu, 21 Nov 2024 19:07:07 +0100 Subject: [PATCH 2/4] update assertions --- .../src/testFunctional/kotlin/MultiModuleFunctionalTest.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dokka-runners/dokka-gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt b/dokka-runners/dokka-gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt index bf98b41589..d07bc9cbd1 100644 --- a/dokka-runners/dokka-gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt +++ b/dokka-runners/dokka-gradle-plugin/src/testFunctional/kotlin/MultiModuleFunctionalTest.kt @@ -146,7 +146,7 @@ class MultiModuleFunctionalTest : FunSpec({ test("expect build is successful") { output shouldContainAll listOf( "BUILD SUCCESSFUL", - "8 actionable tasks: 8 up-to-date", + "6 actionable tasks: 6 up-to-date", ) } @@ -496,9 +496,6 @@ class MultiModuleFunctionalTest : FunSpec({ "> Task :dokkaGeneratePublicationHtml", "> Task :dokkaGeneratePublicationJavadoc", - "> Task :dokkaGenerateModuleHtml", - "> Task :dokkaGenerateModuleJavadoc", - "> Task :subproject-hello:dokkaGenerateModuleHtml", "> Task :subproject-hello:dokkaGenerateModuleJavadoc", From 2a656916367648b06cfb24dff5ac4c8b29bd42ac Mon Sep 17 00:00:00 2001 From: Adam Semenenko <152864218+adam-enko@users.noreply.github.com> Date: Thu, 21 Nov 2024 19:35:07 +0100 Subject: [PATCH 3/4] update assertions --- .../gradle/src/test/kotlin/AndroidComposeIT.kt | 2 -- .../gradle/src/test/kotlin/AndroidProjectIT.kt | 2 -- .../src/testExampleProjects/kotlin/ExampleProjectsTest.kt | 3 --- 3 files changed, 7 deletions(-) diff --git a/dokka-integration-tests/gradle/src/test/kotlin/AndroidComposeIT.kt b/dokka-integration-tests/gradle/src/test/kotlin/AndroidComposeIT.kt index f6a1f80df0..ead53fa2c4 100644 --- a/dokka-integration-tests/gradle/src/test/kotlin/AndroidComposeIT.kt +++ b/dokka-integration-tests/gradle/src/test/kotlin/AndroidComposeIT.kt @@ -93,7 +93,6 @@ class AndroidComposeIT { withClue("expect dokkaGenerate runs successfully") { shouldHaveTask(":dokkaGenerate").shouldHaveOutcome(UP_TO_DATE, SUCCESS) shouldHaveTask(":dokkaGeneratePublicationHtml").shouldHaveOutcome(FROM_CACHE, SUCCESS) - shouldHaveTask(":dokkaGenerateModuleHtml").shouldHaveOutcome(FROM_CACHE, SUCCESS) } } @@ -118,7 +117,6 @@ class AndroidComposeIT { } withClue("expect dokkaGenerate* work tasks are loaded from cache") { shouldHaveTask(":dokkaGeneratePublicationHtml").shouldHaveOutcome(FROM_CACHE) - shouldHaveTask(":dokkaGenerateModuleHtml").shouldHaveOutcome(FROM_CACHE) } } } diff --git a/dokka-integration-tests/gradle/src/test/kotlin/AndroidProjectIT.kt b/dokka-integration-tests/gradle/src/test/kotlin/AndroidProjectIT.kt index 845f948955..51973b83de 100644 --- a/dokka-integration-tests/gradle/src/test/kotlin/AndroidProjectIT.kt +++ b/dokka-integration-tests/gradle/src/test/kotlin/AndroidProjectIT.kt @@ -100,7 +100,6 @@ class AndroidProjectIT { withClue("expect dokkaGenerate runs successfully") { shouldHaveTask(":dokkaGenerate").shouldHaveOutcome(UP_TO_DATE, SUCCESS) shouldHaveTask(":dokkaGeneratePublicationHtml").shouldHaveOutcome(FROM_CACHE, SUCCESS) - shouldHaveTask(":dokkaGenerateModuleHtml").shouldHaveOutcome(FROM_CACHE, SUCCESS) } } @@ -125,7 +124,6 @@ class AndroidProjectIT { } withClue("expect dokkaGenerate* work tasks are loaded from cache") { shouldHaveTask(":dokkaGeneratePublicationHtml").shouldHaveOutcome(FROM_CACHE) - shouldHaveTask(":dokkaGenerateModuleHtml").shouldHaveOutcome(FROM_CACHE) } } } diff --git a/dokka-integration-tests/gradle/src/testExampleProjects/kotlin/ExampleProjectsTest.kt b/dokka-integration-tests/gradle/src/testExampleProjects/kotlin/ExampleProjectsTest.kt index 812243d53d..12b866eba6 100644 --- a/dokka-integration-tests/gradle/src/testExampleProjects/kotlin/ExampleProjectsTest.kt +++ b/dokka-integration-tests/gradle/src/testExampleProjects/kotlin/ExampleProjectsTest.kt @@ -285,7 +285,6 @@ class ExampleProjectsTest { ExampleProject.Multimodule -> { shouldHaveTasksWithOutcome( - ":docs:dokkaGenerateModuleHtml" to FROM_CACHE, ":childProjectA:dokkaGenerateModuleHtml" to FROM_CACHE, ":childProjectB:dokkaGenerateModuleHtml" to FROM_CACHE, ":docs:dokkaGeneratePublicationHtml" to FROM_CACHE, @@ -295,7 +294,6 @@ class ExampleProjectsTest { ExampleProject.VersioningMultimodule -> { shouldHaveTasksWithOutcome( - ":docs:dokkaGenerateModuleHtml" to FROM_CACHE, ":childProjectA:dokkaGenerateModuleHtml" to FROM_CACHE, ":childProjectB:dokkaGenerateModuleHtml" to FROM_CACHE, ":docs:dokkaGeneratePublicationHtml" to FROM_CACHE, @@ -306,7 +304,6 @@ class ExampleProjectsTest { else -> { shouldHaveTasksWithOutcome( ":dokkaGeneratePublicationHtml" to FROM_CACHE, - ":dokkaGenerateModuleHtml" to FROM_CACHE, ":dokkaGenerate" to UP_TO_DATE, ) } From d0dbae75e0bd218e4510615a0b7f526366b890bf Mon Sep 17 00:00:00 2001 From: Adam Semenenko <152864218+adam-enko@users.noreply.github.com> Date: Thu, 21 Nov 2024 19:57:44 +0100 Subject: [PATCH 4/4] update assertions --- .../gradle/src/testExampleProjects/kotlin/ExampleProjectsTest.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/dokka-integration-tests/gradle/src/testExampleProjects/kotlin/ExampleProjectsTest.kt b/dokka-integration-tests/gradle/src/testExampleProjects/kotlin/ExampleProjectsTest.kt index 12b866eba6..cc15b2e68a 100644 --- a/dokka-integration-tests/gradle/src/testExampleProjects/kotlin/ExampleProjectsTest.kt +++ b/dokka-integration-tests/gradle/src/testExampleProjects/kotlin/ExampleProjectsTest.kt @@ -269,7 +269,6 @@ class ExampleProjectsTest { ExampleProject.Javadoc -> { shouldHaveTasksWithOutcome( ":dokkaGeneratePublicationJavadoc" to FROM_CACHE, - ":dokkaGenerateModuleJavadoc" to FROM_CACHE, ":dokkaGenerate" to UP_TO_DATE, ) }