diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-01-31 10:45:29 +0100 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-01-31 15:27:26 +0100 |
commit | dfa067b6ac1f9ad15902fd82d956cf3b53cba18a (patch) | |
tree | 3cdeeae4af2a0d9441410c5360dac5a6367b12cc | |
parent | e99be615ce7c2c2b5c3ee5e3f8941c41c1e7a944 (diff) | |
download | dokka-dfa067b6ac1f9ad15902fd82d956cf3b53cba18a.tar.gz dokka-dfa067b6ac1f9ad15902fd82d956cf3b53cba18a.tar.bz2 dokka-dfa067b6ac1f9ad15902fd82d956cf3b53cba18a.zip |
Fix Gradle integration tests compilation
4 files changed, 11 insertions, 9 deletions
diff --git a/integration-tests/gradle-integration-tests/build.gradle.kts b/integration-tests/gradle-integration-tests/build.gradle.kts index 6a3fc690..d8b3cdc4 100644 --- a/integration-tests/gradle-integration-tests/build.gradle.kts +++ b/integration-tests/gradle-integration-tests/build.gradle.kts @@ -2,6 +2,10 @@ val dokkaPlugin by configurations.creating val dokkaCore by configurations.creating val kotlinGradle by configurations.creating +repositories { + maven(url = "https://kotlin.bintray.com/kotlin-plugin") +} + dependencies { val kotlin_version: String by project testCompileOnly(group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version = kotlin_version) @@ -48,5 +52,3 @@ tasks { exclude("*") // TODO: Remove this exclude when tests are migrated } } - -// TODO: see if this file makes any sense
\ No newline at end of file diff --git a/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt b/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt index 4814e707..b2ec1bfb 100644 --- a/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt +++ b/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt @@ -1,8 +1,8 @@ package org.jetbrains.dokka.gradle -import com.intellij.rt.execution.junit.FileComparisonFailure import org.gradle.testkit.runner.GradleRunner +import org.junit.ComparisonFailure import org.junit.Rule import org.junit.rules.TemporaryFolder import java.io.File @@ -42,7 +42,7 @@ abstract class AbstractDokkaGradleTest { val noErrorClasses = text.replace(errorClassMarker, "?!") if (noErrorClasses != text) { - throw FileComparisonFailure("", noErrorClasses, text, null) + throw ComparisonFailure("", noErrorClasses, text) } checked++ @@ -59,7 +59,7 @@ abstract class AbstractDokkaGradleTest { val noErrorClasses = text.replace(marker, "?!") if (noErrorClasses != text) { - throw FileComparisonFailure("", noErrorClasses, text, null) + throw ComparisonFailure("", noErrorClasses, text) } checked++ @@ -86,7 +86,7 @@ abstract class AbstractDokkaGradleTest { val expected = textWithoutNonMatches.replace(notMatch, fullLink).replace(match, fullLink) val actual = textWithoutMatches.replace(match, fullLink) - throw FileComparisonFailure("", expected, actual, null) + throw ComparisonFailure("", expected, actual) } if (text != textWithoutMatches) totalEntries++ diff --git a/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/Utils.kt b/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/Utils.kt index 6f17af22..c7ced70b 100644 --- a/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/Utils.kt +++ b/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/Utils.kt @@ -1,6 +1,6 @@ package org.jetbrains.dokka.gradle -import com.intellij.rt.execution.junit.FileComparisonFailure +import org.junit.ComparisonFailure import java.io.File import java.io.IOException import java.nio.file.* @@ -26,7 +26,7 @@ fun assertEqualsIgnoringSeparators(expectedFile: File, output: String) { val actualText = output.replace("\r\n", "\n") if (expectedText != actualText) - throw FileComparisonFailure("", expectedText, actualText, expectedFile.canonicalPath) + throw ComparisonFailure("Output differs! Expected file path: ${expectedFile.canonicalPath}", expectedText, actualText) } class CopyFileVisitor(private var sourcePath: Path?, private val targetPath: Path) : SimpleFileVisitor<Path>() { diff --git a/settings.gradle.kts b/settings.gradle.kts index 364a96ad..295c484b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -8,7 +8,7 @@ include("runners:cli") include("runners:maven-plugin") include("plugins:xml") include("plugins:mathjax") -//include("integration-tests:gradle-integration-tests") +include("integration-tests:gradle-integration-tests") pluginManagement { |