aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/gradle
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-08-11 14:10:37 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-14 17:51:11 +0200
commit334619d42d3c26379429ea8cdab13b28c87c159e (patch)
tree928a933b0a914f62a8a45acbf6b3cb59ecf2f728 /integration-tests/gradle
parent33d962a55a559aa706649c29d9dd85d724cc37d9 (diff)
downloaddokka-334619d42d3c26379429ea8cdab13b28c87c159e.tar.gz
dokka-334619d42d3c26379429ea8cdab13b28c87c159e.tar.bz2
dokka-334619d42d3c26379429ea8cdab13b28c87c159e.zip
Refine and test `GradleSourceLinkBuilder` and SourceLinkDefinition API
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() {