aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/test/kotlin
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-03-26 17:35:44 +0100
committerGitHub <noreply@github.com>2021-03-26 17:35:44 +0100
commit9589161d9861a1d2eb02df1c5858b3ff67ca0c7a (patch)
tree308e7d2bcd682e08812e6b68fc182eb276475562 /runners/gradle-plugin/src/test/kotlin
parentac4b818a8616e4de8f702167fe6ddbe911df5d24 (diff)
downloaddokka-9589161d9861a1d2eb02df1c5858b3ff67ca0c7a.tar.gz
dokka-9589161d9861a1d2eb02df1c5858b3ff67ca0c7a.tar.bz2
dokka-9589161d9861a1d2eb02df1c5858b3ff67ca0c7a.zip
Reintroduce multimodule documentation (#1804)
Diffstat (limited to 'runners/gradle-plugin/src/test/kotlin')
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt
index cc9d8706..54f01fa5 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt
@@ -22,7 +22,7 @@ class DokkaMultiModuleTaskTest {
.withProjectDir(rootProject.projectDir.resolve("child"))
.withParent(rootProject).build()
- private val childDokkaTask = childProject.tasks.create<DokkaTask>("childDokkaTask")
+ private val childDokkaTask = childProject.tasks.create<DokkaTaskPartial>("childDokkaTask")
private val multiModuleTask = rootProject.tasks.create<DokkaMultiModuleTask>("multiModuleTask").apply {
addChildTask(childDokkaTask)
@@ -53,6 +53,7 @@ class DokkaMultiModuleTaskTest {
fun buildDokkaConfiguration() {
val include1 = childDokkaTask.project.file("include1.md")
val include2 = childDokkaTask.project.file("include2.md")
+ val topLevelInclude = multiModuleTask.project.file("README.md")
childDokkaTask.apply {
dokkaSourceSets.create("main")
@@ -69,6 +70,7 @@ class DokkaMultiModuleTaskTest {
pluginsConfiguration.add(PluginConfigurationImpl("pluginA", DokkaConfiguration.SerializationFormat.JSON, """ { "key" : "value2" } """))
failOnWarning by true
offlineMode by true
+ includes.from(listOf(topLevelInclude))
}
val dokkaConfiguration = multiModuleTask.buildDokkaConfiguration()
@@ -81,6 +83,7 @@ class DokkaMultiModuleTaskTest {
pluginsClasspath = emptyList(),
failOnWarning = true,
offlineMode = true,
+ includes = setOf(topLevelInclude),
modules = listOf(
DokkaModuleDescriptionImpl(
name = "child",
@@ -100,7 +103,7 @@ class DokkaMultiModuleTaskTest {
assertEquals(1, dependenciesInitial.size, "Expected one dependency")
val dependency = dependenciesInitial.single()
- assertTrue(dependency is DokkaTask, "Expected dependency to be of Type ${DokkaTask::class.simpleName}")
+ assertTrue(dependency is DokkaTaskPartial, "Expected dependency to be of Type ${DokkaTaskPartial::class.simpleName}")
assertEquals(childProject, dependency.project, "Expected dependency from child project")
@@ -138,7 +141,7 @@ class DokkaMultiModuleTaskTest {
}
val secondChildDokkaTaskInclude = childProject.file("include4")
- val secondChildDokkaTask = childProject.tasks.create<DokkaTask>("secondChildDokkaTask") {
+ val secondChildDokkaTask = childProject.tasks.create<DokkaTaskPartial>("secondChildDokkaTask") {
dokkaSourceSets.create("main") {
it.includes.from(secondChildDokkaTaskInclude)
}