aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/test/kotlin
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2020-12-02 15:34:32 +0100
committerGitHub <noreply@github.com>2020-12-02 15:34:32 +0100
commit254f319aadf9327261da7c623fb22a632ce9bab8 (patch)
tree831131756314592c09b29fa8fada41b23b9ce63b /runners/gradle-plugin/src/test/kotlin
parent3cb4702a68139788de6e1f7b087ced345f2b71ba (diff)
downloaddokka-254f319aadf9327261da7c623fb22a632ce9bab8.tar.gz
dokka-254f319aadf9327261da7c623fb22a632ce9bab8.tar.bz2
dokka-254f319aadf9327261da7c623fb22a632ce9bab8.zip
Fix gradle passing 'unspecified' version to dokka configuration (#1650)
Diffstat (limited to 'runners/gradle-plugin/src/test/kotlin')
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaTaskTest.kt11
1 files changed, 11 insertions, 0 deletions
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaTaskTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaTaskTest.kt
index 139ebd3a..546a59db 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaTaskTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaTaskTest.kt
@@ -4,6 +4,7 @@ import org.gradle.kotlin.dsl.create
import org.gradle.testfixtures.ProjectBuilder
import kotlin.test.Test
import kotlin.test.assertEquals
+import kotlin.test.assertNull
class DokkaTaskTest {
@Test
@@ -24,4 +25,14 @@ class DokkaTaskTest {
"Expected only unsuppressed source sets `main` and `test` to be present in built configuration"
)
}
+
+ @Test
+ fun `module version is not present if not specified`(){
+ val project = ProjectBuilder.builder().build()
+ val task = project.tasks.create<DokkaTask>("dokkaTask")
+ project.configurations.all { configuration -> configuration.withDependencies { it.clear() } }
+
+ task.dokkaSourceSets.register("main")
+ assertNull(task.buildDokkaConfiguration().moduleVersion)
+ }
}