aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-08-24 14:02:07 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-08-25 16:21:32 +0200
commit7196323582dce7ca3f9b07262a1f94ecd8514539 (patch)
tree0c326aee84d4727d5cd5bc5c8198b992d5b58de6
parent219e2c98f5d03fc8581fd6ce9dd870919523be44 (diff)
downloaddokka-7196323582dce7ca3f9b07262a1f94ecd8514539.tar.gz
dokka-7196323582dce7ca3f9b07262a1f94ecd8514539.tar.bz2
dokka-7196323582dce7ca3f9b07262a1f94ecd8514539.zip
- Move `test` projects into semantic parent projects
- Implement new `:test-utils` project - Resolve requirement for Android SDK installation
-rw-r--r--core/build.gradle.kts2
-rw-r--r--core/content-matcher-test-utils/build.gradle.kts (renamed from test-tools/build.gradle.kts)4
-rw-r--r--core/content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt (renamed from test-tools/src/main/kotlin/matchers/content/ContentMatchersDsl.kt)0
-rw-r--r--core/content-matcher-test-utils/src/main/kotlin/matchers/content/contentMatchers.kt (renamed from test-tools/src/main/kotlin/matchers/content/contentMatchers.kt)0
-rw-r--r--core/test-api/build.gradle.kts (renamed from testApi/build.gradle.kts)0
-rw-r--r--core/test-api/src/main/kotlin/testApi/context/MockContext.kt (renamed from testApi/src/main/kotlin/testApi/context/MockContext.kt)0
-rw-r--r--core/test-api/src/main/kotlin/testApi/logger/TestLogger.kt (renamed from testApi/src/main/kotlin/testApi/logger/TestLogger.kt)0
-rw-r--r--core/test-api/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt (renamed from testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt)0
-rw-r--r--core/test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt (renamed from testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt)0
-rw-r--r--integration-tests/build.gradle.kts2
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt22
-rw-r--r--integration-tests/src/main/kotlin/org/jetbrains/dokka/it/environmentUtils.kt16
-rw-r--r--plugins/base/base-test-utils/build.gradle.kts (renamed from plugins/base/test-utils/build.gradle.kts)4
-rw-r--r--plugins/base/base-test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt (renamed from plugins/base/test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt)0
-rw-r--r--plugins/base/base-test-utils/src/main/kotlin/renderers/TestPage.kt (renamed from plugins/base/test-utils/src/main/kotlin/renderers/TestPage.kt)0
-rw-r--r--plugins/base/base-test-utils/src/main/kotlin/renderers/defaultSourceSet.kt (renamed from plugins/base/test-utils/src/main/kotlin/renderers/defaultSourceSet.kt)0
-rw-r--r--plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt (renamed from plugins/base/test-utils/src/main/kotlin/utils/TestOutputWriter.kt)0
-rw-r--r--plugins/base/build.gradle.kts4
-rw-r--r--plugins/build.gradle.kts5
-rw-r--r--plugins/gfm/build.gradle.kts2
-rw-r--r--plugins/javadoc/build.gradle.kts2
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt2
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt2
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt2
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt2
-rw-r--r--plugins/kotlin-as-java/build.gradle.kts4
-rw-r--r--plugins/mathjax/build.gradle.kts4
-rw-r--r--runners/gradle-plugin/build.gradle.kts2
-rw-r--r--settings.gradle.kts21
-rw-r--r--test-utils/build.gradle.kts4
-rw-r--r--test-utils/src/main/kotlin/org/jetbrains/dokka/test/assertIsInstance.kt (renamed from testApi/src/main/kotlin/org/jetbrains/dokka/testApi/utils/assertIsInstance.kt)2
-rw-r--r--test-utils/src/main/kotlin/org/jetbrains/dokka/test/assumeAndroidSdkInstalled.kt8
-rw-r--r--test-utils/src/main/kotlin/org/jetbrains/dokka/test/environmentUtils.kt9
-rw-r--r--test/playground.kt99
34 files changed, 65 insertions, 159 deletions
diff --git a/core/build.gradle.kts b/core/build.gradle.kts
index ad3394a6..f4fb1017 100644
--- a/core/build.gradle.kts
+++ b/core/build.gradle.kts
@@ -12,7 +12,7 @@ dependencies {
implementation("org.jsoup:jsoup:1.12.1")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1")
- testImplementation(project(":testApi"))
+ testImplementation(project(":core:test-api"))
testImplementation(kotlin("test-junit"))
}
diff --git a/test-tools/build.gradle.kts b/core/content-matcher-test-utils/build.gradle.kts
index a61787a8..135fc514 100644
--- a/test-tools/build.gradle.kts
+++ b/core/content-matcher-test-utils/build.gradle.kts
@@ -1,6 +1,6 @@
dependencies {
- implementation(project(":testApi"))
+ implementation(project(":core:test-api"))
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
implementation("com.willowtreeapps.assertk:assertk-jvm:0.22")
-} \ No newline at end of file
+}
diff --git a/test-tools/src/main/kotlin/matchers/content/ContentMatchersDsl.kt b/core/content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt
index 67c0e692..67c0e692 100644
--- a/test-tools/src/main/kotlin/matchers/content/ContentMatchersDsl.kt
+++ b/core/content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt
diff --git a/test-tools/src/main/kotlin/matchers/content/contentMatchers.kt b/core/content-matcher-test-utils/src/main/kotlin/matchers/content/contentMatchers.kt
index f42e28f3..f42e28f3 100644
--- a/test-tools/src/main/kotlin/matchers/content/contentMatchers.kt
+++ b/core/content-matcher-test-utils/src/main/kotlin/matchers/content/contentMatchers.kt
diff --git a/testApi/build.gradle.kts b/core/test-api/build.gradle.kts
index fc882f44..fc882f44 100644
--- a/testApi/build.gradle.kts
+++ b/core/test-api/build.gradle.kts
diff --git a/testApi/src/main/kotlin/testApi/context/MockContext.kt b/core/test-api/src/main/kotlin/testApi/context/MockContext.kt
index 97347695..97347695 100644
--- a/testApi/src/main/kotlin/testApi/context/MockContext.kt
+++ b/core/test-api/src/main/kotlin/testApi/context/MockContext.kt
diff --git a/testApi/src/main/kotlin/testApi/logger/TestLogger.kt b/core/test-api/src/main/kotlin/testApi/logger/TestLogger.kt
index 4f81f098..4f81f098 100644
--- a/testApi/src/main/kotlin/testApi/logger/TestLogger.kt
+++ b/core/test-api/src/main/kotlin/testApi/logger/TestLogger.kt
diff --git a/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt b/core/test-api/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt
index 414919dc..414919dc 100644
--- a/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt
+++ b/core/test-api/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt
diff --git a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt b/core/test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt
index a23c2713..a23c2713 100644
--- a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
+++ b/core/test-api/src/main/kotlin/testApi/testRunner/TestRunner.kt
diff --git a/integration-tests/build.gradle.kts b/integration-tests/build.gradle.kts
index a41269b9..76dfeb76 100644
--- a/integration-tests/build.gradle.kts
+++ b/integration-tests/build.gradle.kts
@@ -58,7 +58,7 @@ subprojects {
dependencies {
implementation(kotlin("stdlib"))
- implementation(kotlin("test-junit"))
+ api(project(":test-utils"))
val coroutines_version: String by project
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version")
implementation("org.jsoup:jsoup:1.12.1")
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt
index 6246cade..145992fc 100644
--- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt
@@ -1,9 +1,7 @@
package org.jetbrains.dokka.it.gradle
import org.gradle.testkit.runner.TaskOutcome
-import org.jetbrains.dokka.it.isAndroidSdkInstalled
-import org.jetbrains.dokka.it.isCI
-import org.junit.Assume
+import org.jetbrains.dokka.test.assumeAndroidSdkInstalled
import org.junit.runners.Parameterized.Parameters
import java.io.File
import kotlin.test.*
@@ -28,16 +26,10 @@ class Android0GradleIntegrationTest(override val versions: BuildVersions) : Abst
)
}
- @BeforeTest
- fun assumeAndroidInstallation() {
- if (isCI) {
- return
- }
- Assume.assumeTrue("Missing ANDROID_SDK_ROOT", isAndroidSdkInstalled)
- }
@BeforeTest
fun prepareProjectFiles() {
+ assumeAndroidSdkInstalled()
val templateProjectDir = File("projects", "it-android-0")
templateProjectDir.listFiles().orEmpty()
@@ -91,9 +83,9 @@ class Android0GradleIntegrationTest(override val versions: BuildVersions) : Abst
// TODO: remove this list when https://github.com/Kotlin/dokka/issues/1306 is closed
private val knownUnresolvedDRIs = setOf(
- "it.android/IntegrationTestActivity/findViewById/#kotlin.Int/PointingToGenericParameters(0)/",
- "it.android/IntegrationTestActivity/getExtraData/#java.lang.Class[TypeParam(bounds=[androidx.core.app.ComponentActivity.ExtraData])]/PointingToGenericParameters(0)/",
- "it.android/IntegrationTestActivity/getSystemService/#java.lang.Class[TypeParam(bounds=[kotlin.Any])]/PointingToGenericParameters(0)/",
- "it.android/IntegrationTestActivity/requireViewById/#kotlin.Int/PointingToGenericParameters(0)/"
- )
+ "it.android/IntegrationTestActivity/findViewById/#kotlin.Int/PointingToGenericParameters(0)/",
+ "it.android/IntegrationTestActivity/getExtraData/#java.lang.Class[TypeParam(bounds=[androidx.core.app.ComponentActivity.ExtraData])]/PointingToGenericParameters(0)/",
+ "it.android/IntegrationTestActivity/getSystemService/#java.lang.Class[TypeParam(bounds=[kotlin.Any])]/PointingToGenericParameters(0)/",
+ "it.android/IntegrationTestActivity/requireViewById/#kotlin.Int/PointingToGenericParameters(0)/"
+ )
}
diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/environmentUtils.kt b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/environmentUtils.kt
deleted file mode 100644
index eadf5a8c..00000000
--- a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/environmentUtils.kt
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.jetbrains.dokka.it
-
-import java.io.File
-
-/**
- * Indicating whether or not the current machine executing the test is a CI
- */
-val isCI: Boolean get() = System.getenv("CI") == "true"
-
-val isAndroidSdkInstalled: Boolean = System.getenv("ANDROID_SDK_ROOT") != null ||
- System.getenv("ANDROID_HOME") != null
-
-val isMavenInstalled: Boolean = System.getenv("PATH").orEmpty()
- .split(File.pathSeparator)
- .flatMap { pathElement -> File(pathElement).listFiles().orEmpty().toList() }
- .any { pathElement -> "mvn" == pathElement.name }
diff --git a/plugins/base/test-utils/build.gradle.kts b/plugins/base/base-test-utils/build.gradle.kts
index 4c39ed60..a4a4df69 100644
--- a/plugins/base/test-utils/build.gradle.kts
+++ b/plugins/base/base-test-utils/build.gradle.kts
@@ -1,4 +1,4 @@
dependencies {
compileOnly(project(":plugins:base"))
- implementation(project(":testApi"))
-} \ No newline at end of file
+ implementation(project(":core:test-api"))
+}
diff --git a/plugins/base/test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt b/plugins/base/base-test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt
index e5ff8fa8..e5ff8fa8 100644
--- a/plugins/base/test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt
+++ b/plugins/base/base-test-utils/src/main/kotlin/renderers/RenderingOnlyTestBase.kt
diff --git a/plugins/base/test-utils/src/main/kotlin/renderers/TestPage.kt b/plugins/base/base-test-utils/src/main/kotlin/renderers/TestPage.kt
index 0dae8ce6..0dae8ce6 100644
--- a/plugins/base/test-utils/src/main/kotlin/renderers/TestPage.kt
+++ b/plugins/base/base-test-utils/src/main/kotlin/renderers/TestPage.kt
diff --git a/plugins/base/test-utils/src/main/kotlin/renderers/defaultSourceSet.kt b/plugins/base/base-test-utils/src/main/kotlin/renderers/defaultSourceSet.kt
index a7a20f88..a7a20f88 100644
--- a/plugins/base/test-utils/src/main/kotlin/renderers/defaultSourceSet.kt
+++ b/plugins/base/base-test-utils/src/main/kotlin/renderers/defaultSourceSet.kt
diff --git a/plugins/base/test-utils/src/main/kotlin/utils/TestOutputWriter.kt b/plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt
index 00b865b4..00b865b4 100644
--- a/plugins/base/test-utils/src/main/kotlin/utils/TestOutputWriter.kt
+++ b/plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt
diff --git a/plugins/base/build.gradle.kts b/plugins/base/build.gradle.kts
index 9ffecbd7..e8335999 100644
--- a/plugins/base/build.gradle.kts
+++ b/plugins/base/build.gradle.kts
@@ -11,8 +11,8 @@ dependencies {
api(project(":kotlin-analysis"))
implementation("org.jsoup:jsoup:1.12.1")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1")
- testImplementation(project(":test-tools"))
- testImplementation(project(":plugins:base:test-utils"))
+ testImplementation(project(":plugins:base:base-test-utils"))
+ testImplementation(project(":core:content-matcher-test-utils"))
val kotlinx_html_version: String by project
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:$kotlinx_html_version")
diff --git a/plugins/build.gradle.kts b/plugins/build.gradle.kts
index 6ce58a47..dad4d647 100644
--- a/plugins/build.gradle.kts
+++ b/plugins/build.gradle.kts
@@ -13,7 +13,8 @@ subprojects {
implementation(kotlin("stdlib"))
implementation(kotlin("reflect"))
- testImplementation(project(":testApi"))
+ testImplementation(project(":test-utils"))
+ testImplementation(project(":core:test-api"))
testImplementation("org.junit.jupiter:junit-jupiter:5.6.0")
}
@@ -27,4 +28,4 @@ subprojects {
showStackTraces = true
}
}
-} \ No newline at end of file
+}
diff --git a/plugins/gfm/build.gradle.kts b/plugins/gfm/build.gradle.kts
index 3f69043d..33917cdf 100644
--- a/plugins/gfm/build.gradle.kts
+++ b/plugins/gfm/build.gradle.kts
@@ -3,7 +3,7 @@ import org.jetbrains.registerDokkaArtifactPublication
dependencies {
implementation(project(":plugins:base"))
testImplementation(project(":plugins:base"))
- testImplementation(project(":plugins:base:test-utils"))
+ testImplementation(project(":plugins:base:base-test-utils"))
}
registerDokkaArtifactPublication("gfmPlugin") {
diff --git a/plugins/javadoc/build.gradle.kts b/plugins/javadoc/build.gradle.kts
index a20daac0..d57e14f3 100644
--- a/plugins/javadoc/build.gradle.kts
+++ b/plugins/javadoc/build.gradle.kts
@@ -4,7 +4,7 @@ dependencies {
implementation("com.soywiz.korlibs.korte:korte-jvm:1.10.3")
implementation(project(":plugins:base"))
implementation(project(":plugins:kotlin-as-java"))
- testImplementation(project(":plugins:base:test-utils"))
+ testImplementation(project(":plugins:base:base-test-utils"))
val kotlinx_html_version: String by project
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:$kotlinx_html_version")
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt
index 57835490..f62c1886 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt
@@ -4,9 +4,9 @@ import org.jetbrains.dokka.javadoc.pages.AllClassesPage
import org.jetbrains.dokka.javadoc.pages.LinkJavadocListEntry
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.pages.ContentKind
+import org.jetbrains.dokka.test.assertIsInstance
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
-import org.jetbrains.dokka.testApi.utils.assertIsInstance
internal class JavadocAllClassesTemplateMapTest : AbstractJavadocTemplateMapTest() {
@Test
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt
index 2ae5302d..f03b10b4 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt
@@ -3,7 +3,7 @@ package org.jetbrains.dokka.javadoc
import org.jetbrains.dokka.javadoc.pages.JavadocClasslikePageNode
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
-import org.jetbrains.dokka.testApi.utils.assertIsInstance
+import org.jetbrains.dokka.test.assertIsInstance
internal class JavadocClasslikeTemplateMapTest : AbstractJavadocTemplateMapTest() {
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt
index 7353be94..8a999fb3 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt
@@ -5,7 +5,7 @@ import org.jetbrains.dokka.javadoc.pages.RowJavadocListEntry
import org.jetbrains.dokka.links.DRI
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
-import org.jetbrains.dokka.testApi.utils.assertIsInstance
+import org.jetbrains.dokka.test.assertIsInstance
internal class JavadocModuleTemplateMapTest : AbstractJavadocTemplateMapTest() {
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt
index aa5013e5..9816c11c 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt
@@ -7,7 +7,7 @@ import org.jetbrains.dokka.links.DRI
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.jetbrains.dokka.testApi.utils.assertIsInstance
+import org.jetbrains.dokka.test.assertIsInstance
import java.io.File
internal class JavadocPackageTemplateMapTest : AbstractJavadocTemplateMapTest() {
diff --git a/plugins/kotlin-as-java/build.gradle.kts b/plugins/kotlin-as-java/build.gradle.kts
index eda6114f..f03a28c6 100644
--- a/plugins/kotlin-as-java/build.gradle.kts
+++ b/plugins/kotlin-as-java/build.gradle.kts
@@ -3,8 +3,8 @@ import org.jetbrains.registerDokkaArtifactPublication
dependencies {
implementation(project(":plugins:base"))
testImplementation(project(":plugins:base"))
- testImplementation(project(":plugins:base:test-utils"))
- testImplementation(project(":test-tools"))
+ testImplementation(project(":plugins:base:base-test-utils"))
+ testImplementation(project(":core:content-matcher-test-utils"))
}
registerDokkaArtifactPublication("kotlinAsJavaPlugin") {
diff --git a/plugins/mathjax/build.gradle.kts b/plugins/mathjax/build.gradle.kts
index e570de46..448d9e6d 100644
--- a/plugins/mathjax/build.gradle.kts
+++ b/plugins/mathjax/build.gradle.kts
@@ -3,8 +3,8 @@ import org.jetbrains.registerDokkaArtifactPublication
dependencies {
testImplementation("org.jsoup:jsoup:1.12.1")
testImplementation(project(":plugins:base"))
- testImplementation(project(":plugins:base:test-utils"))
- testImplementation(project(":test-tools"))
+ testImplementation(project(":plugins:base:base-test-utils"))
+ testImplementation(project(":core:content-matcher-test-utils"))
testImplementation(kotlin("test-junit"))
testImplementation(project(":kotlin-analysis"))
}
diff --git a/runners/gradle-plugin/build.gradle.kts b/runners/gradle-plugin/build.gradle.kts
index 7ab2c11b..73bdb76f 100644
--- a/runners/gradle-plugin/build.gradle.kts
+++ b/runners/gradle-plugin/build.gradle.kts
@@ -19,9 +19,9 @@ dependencies {
compileOnly("com.android.tools.build:gradle:4.0.1")
compileOnly(gradleApi())
compileOnly(gradleKotlinDsl())
+ testImplementation(project(":test-utils"))
testImplementation(gradleApi())
testImplementation(gradleKotlinDsl())
- testImplementation(kotlin("test-junit"))
testImplementation("org.jetbrains.kotlin:kotlin-gradle-plugin")
testImplementation("com.android.tools.build:gradle:4.0.1")
diff --git a/settings.gradle.kts b/settings.gradle.kts
index c0445e9d..d714b676 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -1,28 +1,35 @@
rootProject.name = "dokka"
include("core")
-include("plugins:base:search-component")
-include("testApi")
-include("test-tools")
-include("runners:gradle-plugin")
-include("runners:cli")
-include("runners:maven-plugin")
+include("core:test-api")
+include("core:content-matcher-test-utils")
+
include("kotlin-analysis")
include("kotlin-analysis:intellij-dependency")
include("kotlin-analysis:compiler-dependency")
+
+include("runners:gradle-plugin")
+include("runners:cli")
+include("runners:maven-plugin")
+
include("plugins:base")
include("plugins:base:frontend")
-include("plugins:base:test-utils")
+include("plugins:base:search-component")
+include("plugins:base:base-test-utils")
+
include("plugins:mathjax")
include("plugins:gfm")
include("plugins:jekyll")
include("plugins:kotlin-as-java")
include("plugins:javadoc")
+
include("integration-tests")
include("integration-tests:gradle")
include("integration-tests:cli")
include("integration-tests:maven")
+include("test-utils")
+
pluginManagement {
val kotlin_version: String by settings
plugins {
diff --git a/test-utils/build.gradle.kts b/test-utils/build.gradle.kts
new file mode 100644
index 00000000..23e7ef40
--- /dev/null
+++ b/test-utils/build.gradle.kts
@@ -0,0 +1,4 @@
+
+dependencies {
+ api(kotlin("test-junit"))
+}
diff --git a/testApi/src/main/kotlin/org/jetbrains/dokka/testApi/utils/assertIsInstance.kt b/test-utils/src/main/kotlin/org/jetbrains/dokka/test/assertIsInstance.kt
index 00c00ebb..d646d385 100644
--- a/testApi/src/main/kotlin/org/jetbrains/dokka/testApi/utils/assertIsInstance.kt
+++ b/test-utils/src/main/kotlin/org/jetbrains/dokka/test/assertIsInstance.kt
@@ -1,4 +1,4 @@
-package org.jetbrains.dokka.testApi.utils
+package org.jetbrains.dokka.test
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.contract
diff --git a/test-utils/src/main/kotlin/org/jetbrains/dokka/test/assumeAndroidSdkInstalled.kt b/test-utils/src/main/kotlin/org/jetbrains/dokka/test/assumeAndroidSdkInstalled.kt
new file mode 100644
index 00000000..0c0e6d31
--- /dev/null
+++ b/test-utils/src/main/kotlin/org/jetbrains/dokka/test/assumeAndroidSdkInstalled.kt
@@ -0,0 +1,8 @@
+package org.jetbrains.dokka.test
+
+import org.junit.Assume.assumeTrue
+
+fun assumeAndroidSdkInstalled() {
+ if (isCI) return
+ assumeTrue(isAndroidSdkInstalled)
+}
diff --git a/test-utils/src/main/kotlin/org/jetbrains/dokka/test/environmentUtils.kt b/test-utils/src/main/kotlin/org/jetbrains/dokka/test/environmentUtils.kt
new file mode 100644
index 00000000..e9b7be95
--- /dev/null
+++ b/test-utils/src/main/kotlin/org/jetbrains/dokka/test/environmentUtils.kt
@@ -0,0 +1,9 @@
+package org.jetbrains.dokka.test
+
+/**
+ * Indicating whether or not the current machine executing the test is a CI
+ */
+val isCI: Boolean get() = System.getenv("CI") == "true"
+
+val isAndroidSdkInstalled: Boolean = System.getenv("ANDROID_SDK_ROOT") != null ||
+ System.getenv("ANDROID_HOME") != null
diff --git a/test/playground.kt b/test/playground.kt
deleted file mode 100644
index 5206e10e..00000000
--- a/test/playground.kt
+++ /dev/null
@@ -1,99 +0,0 @@
-// this file is not included in sources or tests, you can play with it for debug purposes
-// Console run configuration will analyse it and provide lots of debug output
-package dokka.playground
-
-fun topLevelFunction() {
-}
-
-val topLevelConstantValue = "Hello"
-
-val topLevelValue: String
- get() = "Bye bye"
-
-var topLevelVariable: String
- get() = "Modify me!"
- set(value) {
- }
-
-/**
- * This is a class
- */
-class Class {
- fun memberFunction() {
- }
-
- val memberValue = "Member"
-}
-
-/**
- * This is a class with constructor and space after doc
- */
-
-class ClassWithConstructor(
- /** Doc at parameter */ val name: Class)
-
-/**
- * This is data class with constructor and two properties
- * Also look at [Employee]
- *
- * $name Person's name
- * $age Person's age
- *
- */
-data class Person(val name: ClassWithConstructor, val age: Int) {}
-
-data class Employee(val name: ClassWithConstructor, val age: Int) {}
-
-object Object {
- throws(javaClass<IllegalArgumentException>())
- fun objectFunction() {
- }
-
- val objectValue: String
- /** one line getter doc */
- get() = "Member"
-
- public val String.valueWithReceiver: Int
- get() = 1
-
-}
-
-enum class Color(r: Int, g: Int, b: Int) {
- Red : Color(100,0,0)
- Green : Color(0,100,0)
- Blue : Color(0,0,100)
-}
-
-class OuterClass {
-
- /**
- * $T type of the item
- */
- class NestedClass<T> {
- fun nestedClassFunction(item: T) {
- }
-
- fun String.functionWithReceiver(): Int = 1
-
- }
-
- inner class InnerClass {
- open fun innerClassFunction<
- /** doc for R1 type param */
- R1,
- /** doc for R2 type param */
- R2
- >() {
- }
- }
-
- object NestedObject {
- protected open fun nestedObjectFunction() {
- }
- }
-}
-
-trait Interface {
- fun worker()
- val extra: String
-} \ No newline at end of file