aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/gradle
diff options
context:
space:
mode:
Diffstat (limited to 'integration-tests/gradle')
-rw-r--r--integration-tests/gradle/projects/it-basic/build.gradle.kts7
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt18
2 files changed, 25 insertions, 0 deletions
diff --git a/integration-tests/gradle/projects/it-basic/build.gradle.kts b/integration-tests/gradle/projects/it-basic/build.gradle.kts
index 43d3a0f3..081197ad 100644
--- a/integration-tests/gradle/projects/it-basic/build.gradle.kts
+++ b/integration-tests/gradle/projects/it-basic/build.gradle.kts
@@ -21,6 +21,13 @@ tasks.withType<DokkaTask> {
prefix.set("it.suppressedByPackage")
suppress.set(true)
}
+ sourceLink {
+ localDirectory.set(file("src/main"))
+ remoteUrl.set(
+ "https://github.com/Kotlin/dokka/tree/master/" +
+ "integration-tests/gradle/projects/it-basic/src/main"
+ )
+ }
}
register("myTest") {
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt
index 46577e81..60f03d0f 100644
--- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt
@@ -84,6 +84,24 @@ class BasicGradleIntegrationTest(override val versions: BuildVersions) : Abstrac
allHtmlFiles().any { file -> "Basic Project" in file.readText() },
"Expected configured moduleDisplayName to be present in html"
)
+
+ assertTrue(
+ allHtmlFiles().any { file ->
+ "https://github.com/Kotlin/dokka/tree/master/" +
+ "integration-tests/gradle/projects/it-basic/" +
+ "src/main/kotlin/it/basic/PublicClass.kt" in file.readText()
+ },
+ "Expected `PublicClass` source link to GitHub"
+ )
+
+ assertTrue(
+ allHtmlFiles().any { file ->
+ "https://github.com/Kotlin/dokka/tree/master/" +
+ "integration-tests/gradle/projects/it-basic/" +
+ "src/main/java/it/basic/java/SampleJavaClass.java" in file.readText()
+ },
+ "Expected `SampleJavaClass` source link to GitHub"
+ )
}
private fun File.assertJavadocOutputDir() {