diff options
Diffstat (limited to 'integration-tests/gradle')
2 files changed, 25 insertions, 0 deletions
diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts b/integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts index 1e61f8b2..d24b90c5 100644 --- a/integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts +++ b/integration-tests/gradle/projects/it-multimodule-0/moduleA/build.gradle.kts @@ -8,3 +8,13 @@ plugins { kotlin("jvm") id("org.jetbrains.dokka") } + +allprojects { + tasks.withType<org.jetbrains.dokka.gradle.AbstractDokkaTask> { + pluginsMapConfiguration.set( + mapOf( + "org.jetbrains.dokka.base.DokkaBase" to """{ "homepageLink" : "https://github.com/Kotlin/dokka/tree/master/integration-tests/gradle/projects/it-multimodule-0/" }""" + ) + ) + } +} diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt index 54ac3ff8..f4061345 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt @@ -73,6 +73,21 @@ class MultiModule0IntegrationTest : AbstractGradleIntegrationTest() { "Expected moduleC being mentioned in -modules.html" ) + val htmlsWithHomepageLink = outputDir.walkTopDown().filter { + it.isFile && it.extension == "html" && it.name != "navigation.html" + }.toList() + + assertEquals(16, htmlsWithHomepageLink.size) + + htmlsWithHomepageLink.forEach { + assertTrue( + it.readText().contains( + """https://github.com/Kotlin/dokka/tree/master/integration-tests/gradle/projects/it-multimodule-0/""" + ), + "File ${it.absolutePath} doesn't contain link to homepage" + ) + } + val gfmOutputDir = File(projectDir, "moduleA/build/dokka/gfmMultiModule") assertTrue(gfmOutputDir.isDirectory, "Missing dokka GFM output directory") |