diff options
Diffstat (limited to 'integration-tests/gradle')
5 files changed, 21 insertions, 20 deletions
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt index 0e8fd59a..7d6b42c3 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt @@ -6,7 +6,6 @@ package org.jetbrains.dokka.it.gradle import org.gradle.util.GradleVersion import java.io.File -import kotlin.test.assertContains import kotlin.test.assertTrue abstract class AbstractGradleCachingIntegrationTest : AbstractGradleIntegrationTest() { @@ -128,12 +127,13 @@ abstract class AbstractGradleCachingIntegrationTest : AbstractGradleIntegrationT "Anchors should not have hashes inside" ) - assertContains( - stylesDir.resolve("logo-styles.css").readText(), - "--dokka-logo-image-url: url('https://upload.wikimedia.org/wikipedia/commons/9/9d/Ubuntu_logo.svg');", + assertTrue( + stylesDir.resolve("logo-styles.css").readText().contains( + "--dokka-logo-image-url: url('https://upload.wikimedia.org/wikipedia/commons/9/9d/Ubuntu_logo.svg');", + ) ) assertTrue(stylesDir.resolve("custom-style-to-add.css").isFile) - assertContains(stylesDir.resolve("custom-style-to-add.css").readText(), "/* custom stylesheet */") + assertTrue(stylesDir.resolve("custom-style-to-add.css").readText().contains("/* custom stylesheet */")) allHtmlFiles().forEach { file -> if(file.name != "navigation.html") assertTrue("custom-style-to-add.css" in file.readText(), "custom styles not added to html file ${file.name}") } 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 1c067a8b..0256f593 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 @@ -134,12 +134,13 @@ class BasicGradleIntegrationTest : AbstractGradleIntegrationTest() { "Anchors should not have hashes inside" ) - assertContains( - stylesDir.resolve("logo-styles.css").readText(), - "--dokka-logo-image-url: url('https://upload.wikimedia.org/wikipedia/commons/9/9d/Ubuntu_logo.svg');", + assertTrue( + stylesDir.resolve("logo-styles.css").readText().contains( + "--dokka-logo-image-url: url('https://upload.wikimedia.org/wikipedia/commons/9/9d/Ubuntu_logo.svg');", + ) ) assertTrue(stylesDir.resolve("custom-style-to-add.css").isFile) - assertContains(stylesDir.resolve("custom-style-to-add.css").readText(), "/* custom stylesheet */") + assertTrue(stylesDir.resolve("custom-style-to-add.css").readText().contains("/* custom stylesheet */")) allHtmlFiles().forEach { file -> if (file.name != "navigation.html") assertTrue( "custom-style-to-add.css" in file.readText(), diff --git a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt index 490619e0..f2b28578 100644 --- a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt +++ b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt @@ -14,17 +14,17 @@ import java.io.File import java.net.URI import kotlin.test.BeforeTest -abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() { +public abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() { @BeforeTest - fun copyTemplates() { + public fun copyTemplates() { File("projects").listFiles().orEmpty() .filter { it.isFile } .filter { it.name.startsWith("template.") } .forEach { file -> file.copyTo(File(tempFolder, file.name)) } } - fun createGradleRunner( + public fun createGradleRunner( buildVersions: BuildVersions, vararg arguments: String, jvmArgs: List<String> = listOf("-Xmx2G", "-XX:MaxMetaspaceSize=1G") @@ -47,7 +47,7 @@ abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() { .withJvmArguments(jvmArgs) } - fun GradleRunner.buildRelaxed(): BuildResult { + public fun GradleRunner.buildRelaxed(): BuildResult { return try { build() } catch (e: Throwable) { diff --git a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/BuildVersions.kt b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/BuildVersions.kt index 6cd73e32..ab387420 100644 --- a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/BuildVersions.kt +++ b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/BuildVersions.kt @@ -6,12 +6,12 @@ package org.jetbrains.dokka.it.gradle import org.gradle.util.GradleVersion -data class BuildVersions( +public data class BuildVersions( val gradleVersion: GradleVersion, val kotlinVersion: String, val androidGradlePluginVersion: String? = null, ) { - constructor( + public constructor( gradleVersion: String, kotlinVersion: String, androidGradlePluginVersion: String? = null @@ -30,8 +30,8 @@ data class BuildVersions( } } - companion object { - fun permutations( + public companion object { + public fun permutations( gradleVersions: List<String>, kotlinVersions: List<String>, androidGradlePluginVersions: List<String?> = listOf(null) diff --git a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt index 206c03dd..174060aa 100644 --- a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt +++ b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt @@ -4,8 +4,8 @@ package org.jetbrains.dokka.it.gradle -object TestEnvironment { - val isExhaustive = checkNotNull(System.getenv("isExhaustive")) { +public object TestEnvironment { + public val isExhaustive: Boolean = checkNotNull(System.getenv("isExhaustive")) { "Missing `isExhaustive` environment variable" }.toBoolean() } @@ -13,6 +13,6 @@ object TestEnvironment { /** * Will only return values if [TestEnvironment.isExhaustive] is set to true */ -inline fun <reified T> ifExhaustive(vararg values: T): Array<out T> { +public inline fun <reified T> ifExhaustive(vararg values: T): Array<out T> { return if (TestEnvironment.isExhaustive) values else emptyArray() } |