diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-08-20 08:54:26 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-20 16:36:30 +0200 |
commit | ccd630109f1ed28d7e3113f1005dfee46160db46 (patch) | |
tree | 179fbec8c477344fb45efac0bd4cee1a3deeb7f8 /runners/gradle-plugin | |
parent | 872008d130c1b4f7e8721a0f177636ac9b157de6 (diff) | |
download | dokka-ccd630109f1ed28d7e3113f1005dfee46160db46.tar.gz dokka-ccd630109f1ed28d7e3113f1005dfee46160db46.tar.bz2 dokka-ccd630109f1ed28d7e3113f1005dfee46160db46.zip |
Fix tests for changed KotlinSourceSetGist
Diffstat (limited to 'runners/gradle-plugin')
2 files changed, 11 insertions, 12 deletions
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt index 49db0eb6..c4525f72 100644 --- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt +++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt @@ -25,9 +25,10 @@ class ConfigureWithKotlinSourceSetGistTest { val gist = KotlinSourceSetGist( name = "customName", - platform = KotlinPlatformType.common, + platform = project.provider { KotlinPlatformType.common }, isMain = project.provider { true }, - classpath = project.files(f1Jar, f2Jar), + // TODO NOW: Test if it changes + classpath = project.provider { project.files(f1Jar, f2Jar) }, sourceRoots = project.files(customSourceRoot), dependentSourceSetNames = project.provider { setOf("customRootSourceSet") } ) @@ -67,9 +68,9 @@ class ConfigureWithKotlinSourceSetGistTest { val gist = KotlinSourceSetGist( name = "customMain", - platform = KotlinPlatformType.common, + platform = project.provider { KotlinPlatformType.common }, isMain = project.provider { true }, - classpath = project.files(), + classpath = project.provider { project.files() }, sourceRoots = project.files(), dependentSourceSetNames = project.provider { emptySet() } ) diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt index eff0726f..bf3da6ef 100644 --- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt +++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinSourceSetGistTest.kt @@ -3,12 +3,10 @@ package org.jetbrains.dokka.gradle import org.gradle.api.artifacts.FileCollectionDependency import org.gradle.kotlin.dsl.get import org.gradle.testfixtures.ProjectBuilder -import org.jetbrains.dokka.Platform import org.jetbrains.dokka.gradle.kotlin.gistOf import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType -import org.jetbrains.kotlin.gradle.utils.`is` import java.io.File import kotlin.test.Test import kotlin.test.assertEquals @@ -32,7 +30,7 @@ class KotlinSourceSetGistTest { ) assertEquals( - KotlinPlatformType.jvm, mainSourceSetGist.platform, + KotlinPlatformType.jvm, mainSourceSetGist.platform.getSafe(), "Expected correct platform" ) @@ -140,7 +138,7 @@ class KotlinSourceSetGistTest { } assertEquals( - emptySet(), mainSourceSetGist.classpath.files, + emptySet(), mainSourceSetGist.classpath.getSafe().files, "Expected no files on the classpath, since no file exists" ) @@ -151,7 +149,7 @@ class KotlinSourceSetGistTest { check(runtimeOnlyJar.createNewFile()) assertEquals( - setOf(implementationJar, compileOnlyJar, apiJar), mainSourceSetGist.classpath.files, + setOf(implementationJar, compileOnlyJar, apiJar), mainSourceSetGist.classpath.getSafe().files, "Expected implementation, compileOnly and api dependencies on classpath" ) } @@ -189,17 +187,17 @@ class KotlinSourceSetGistTest { ) assertEquals( - KotlinPlatformType.common, commonMainSourceSetGist.platform, + KotlinPlatformType.common, commonMainSourceSetGist.platform.getSafe(), "Expected common platform for commonMain source set" ) assertEquals( - KotlinPlatformType.jvm, jvmMainSourceSetGist.platform, + KotlinPlatformType.jvm, jvmMainSourceSetGist.platform.getSafe(), "Expected jvm platform for jvmMain source set" ) assertEquals( - KotlinPlatformType.native, macosMainSourceSetGist.platform, + KotlinPlatformType.native, macosMainSourceSetGist.platform.getSafe(), "Expected native platform for macosMain source set" ) |