diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts index befec76fa9..0dbac364c6 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts @@ -43,4 +43,6 @@ dependencies { // repetitive, but more declarative and clear), or some other solution. testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") testRuntimeOnly("org.junit.vintage:junit-vintage-engine") + // kotlin-test asserts for all projects + testImplementation(kotlin("test-junit")) } diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts index c07fc0921b..28a8d76d25 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts @@ -11,15 +11,21 @@ plugins { configureDokkaVersion() +val projectsWithoutOptInDependency = setOf( + ":integration-tests", ":integration-tests:gradle", ":integration-tests:maven", ":integration-tests:cli") + tasks.withType().configureEach { + // By path because Dokka has multiple projects with the same name (i.e. 'cli') + if (project.path in projectsWithoutOptInDependency) return@configureEach compilerOptions { freeCompilerArgs.addAll( listOf( "-opt-in=kotlin.RequiresOptIn", + "-opt-in=org.jetbrains.dokka.InternalDokkaApi", "-Xjsr305=strict", "-Xskip-metadata-version-check", // need 1.4 support, otherwise there might be problems with Gradle 6.x (it's bundling Kotlin 1.4) - "-Xsuppress-version-warnings" + "-Xsuppress-version-warnings", ) ) allWarningsAsErrors.set(true) diff --git a/build.gradle.kts b/build.gradle.kts index 5e46c36566..69c4497393 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ import org.jetbrains.ValidatePublications +import org.jetbrains.kotlin.gradle.tasks.* import org.jetbrains.publicationChannels @Suppress("DSL_SCOPE_VIOLATION") // fixed in Gradle 8.1 https://github.com/gradle/gradle/pull/23639 @@ -50,7 +51,5 @@ apiValidation { "gradle", // :integration-tests:gradle "cli", // :integration-tests:cli "maven", // integration-tests:maven - - "test-utils", // :test-utils ) } diff --git a/core/api/core.api b/core/api/core.api index ddd77a5c50..d66c5d9ecf 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -4580,7 +4580,6 @@ public final class org/jetbrains/dokka/utilities/DokkaConsoleLogger : org/jetbra public fun debug (Ljava/lang/String;)V public fun error (Ljava/lang/String;)V public fun getErrorsCount ()I - public final fun getMinLevel ()Lorg/jetbrains/dokka/utilities/LoggingLevel; public fun getWarningsCount ()I public fun info (Ljava/lang/String;)V public fun progress (Ljava/lang/String;)V diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 49b022ef97..ded27ec7aa 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -40,12 +40,6 @@ tasks { } } -tasks.withType(KotlinCompile::class).all { - kotlinOptions { - freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=org.jetbrains.dokka.InternalDokkaApi",) - } -} - registerDokkaArtifactPublication("dokkaCore") { artifactId = "dokka-core" } diff --git a/core/src/main/kotlin/utilities/DokkaLogging.kt b/core/src/main/kotlin/utilities/DokkaLogging.kt index 395293243b..5cca6d532a 100644 --- a/core/src/main/kotlin/utilities/DokkaLogging.kt +++ b/core/src/main/kotlin/utilities/DokkaLogging.kt @@ -39,7 +39,7 @@ fun interface MessageEmitter : (String) -> Unit { } class DokkaConsoleLogger( - val minLevel: LoggingLevel = LoggingLevel.PROGRESS, + private val minLevel: LoggingLevel = LoggingLevel.PROGRESS, private val emitter: MessageEmitter = MessageEmitter.consoleEmitter ) : DokkaLogger { private val warningsCounter = AtomicInteger() diff --git a/core/src/main/kotlin/utilities/Html.kt b/core/src/main/kotlin/utilities/Html.kt index 874c9fb1f2..a1d8ececb6 100644 --- a/core/src/main/kotlin/utilities/Html.kt +++ b/core/src/main/kotlin/utilities/Html.kt @@ -1,5 +1,6 @@ package org.jetbrains.dokka.utilities +import org.jetbrains.dokka.* import java.net.URLEncoder @@ -7,9 +8,12 @@ import java.net.URLEncoder * Replaces symbols reserved in HTML with their respective entities. * Replaces & with &, < with < and > with > */ +@InternalDokkaApi fun String.htmlEscape(): String = replace("&", "&").replace("<", "<").replace(">", ">").replace("\"", """) +@InternalDokkaApi fun String.urlEncoded(): String = URLEncoder.encode(this, "UTF-8") +@InternalDokkaApi fun String.formatToEndWithHtml() = if (endsWith(".html") || contains(Regex("\\.html#"))) this else "$this.html" diff --git a/core/src/main/kotlin/utilities/ServiceLocator.kt b/core/src/main/kotlin/utilities/ServiceLocator.kt index 3e515348b0..f86960ec40 100644 --- a/core/src/main/kotlin/utilities/ServiceLocator.kt +++ b/core/src/main/kotlin/utilities/ServiceLocator.kt @@ -1,5 +1,6 @@ package org.jetbrains.dokka.utilities +import org.jetbrains.dokka.* import java.io.File import java.net.URISyntaxException import java.net.URL @@ -7,10 +8,13 @@ import java.util.* import java.util.jar.JarFile import java.util.zip.ZipEntry +@InternalDokkaApi data class ServiceDescriptor(val name: String, val category: String, val description: String?, val className: String) +@InternalDokkaApi class ServiceLookupException(message: String) : Exception(message) +@InternalDokkaApi object ServiceLocator { fun lookup(clazz: Class, category: String, implementationName: String): T { val descriptor = lookupDescriptor(category, implementationName) @@ -81,9 +85,6 @@ object ServiceLocator { } } -inline fun ServiceLocator.lookup(category: String, implementationName: String): T = lookup(T::class.java, category, implementationName) -inline fun ServiceLocator.lookup(desc: ServiceDescriptor): T = lookup(T::class.java, desc) - private val ZipEntry.fileName: String get() = name.substringAfterLast("/", name) diff --git a/core/src/main/kotlin/utilities/Uri.kt b/core/src/main/kotlin/utilities/Uri.kt index 089b3cfff6..67c81d98b1 100644 --- a/core/src/main/kotlin/utilities/Uri.kt +++ b/core/src/main/kotlin/utilities/Uri.kt @@ -1,8 +1,10 @@ package org.jetbrains.dokka.utilities +import org.jetbrains.dokka.* import java.net.URI - +@InternalDokkaApi +@Deprecated("Deprecated for removal") // Unused in Dokka fun URI.relativeTo(uri: URI): URI { // Normalize paths to remove . and .. segments val base = uri.normalize() @@ -37,4 +39,4 @@ fun URI.relativeTo(uri: URI): URI { append(it) } }) -} \ No newline at end of file +} diff --git a/core/src/main/kotlin/utilities/associateWithNotNull.kt b/core/src/main/kotlin/utilities/associateWithNotNull.kt index ea2e8c3c08..6c0bf4d83e 100644 --- a/core/src/main/kotlin/utilities/associateWithNotNull.kt +++ b/core/src/main/kotlin/utilities/associateWithNotNull.kt @@ -1,5 +1,8 @@ package org.jetbrains.dokka.utilities +import org.jetbrains.dokka.* + +@InternalDokkaApi inline fun Iterable.associateWithNotNull(valueSelector: (K) -> V?): Map { @Suppress("UNCHECKED_CAST") return associateWith { valueSelector(it) }.filterValues { it != null } as Map diff --git a/core/src/main/kotlin/utilities/cast.kt b/core/src/main/kotlin/utilities/cast.kt index d4a8d73da3..784b7e2a9b 100644 --- a/core/src/main/kotlin/utilities/cast.kt +++ b/core/src/main/kotlin/utilities/cast.kt @@ -1,5 +1,8 @@ package org.jetbrains.dokka.utilities +import org.jetbrains.dokka.* + +@InternalDokkaApi inline fun Any.cast(): T { return this as T } diff --git a/core/src/main/kotlin/utilities/parallelCollectionOperations.kt b/core/src/main/kotlin/utilities/parallelCollectionOperations.kt index 35ad48fd36..d24aa7a67b 100644 --- a/core/src/main/kotlin/utilities/parallelCollectionOperations.kt +++ b/core/src/main/kotlin/utilities/parallelCollectionOperations.kt @@ -1,15 +1,19 @@ package org.jetbrains.dokka.utilities import kotlinx.coroutines.* +import org.jetbrains.dokka.* +@InternalDokkaApi suspend inline fun Iterable.parallelMap(crossinline f: suspend (A) -> B): List = coroutineScope { map { async { f(it) } }.awaitAll() } +@InternalDokkaApi suspend inline fun Iterable.parallelMapNotNull(crossinline f: suspend (A) -> B?): List = coroutineScope { map { async { f(it) } }.awaitAll().filterNotNull() } +@InternalDokkaApi suspend inline fun Iterable.parallelForEach(crossinline f: suspend (A) -> Unit): Unit = coroutineScope { forEach { launch { f(it) } } } diff --git a/integration-tests/build.gradle.kts b/integration-tests/build.gradle.kts index 7f3eee421a..a3173af003 100644 --- a/integration-tests/build.gradle.kts +++ b/integration-tests/build.gradle.kts @@ -3,7 +3,7 @@ plugins { } dependencies { - api(projects.testUtils) + implementation(kotlin("test-junit")) implementation(libs.kotlinx.coroutines.core) implementation(libs.jsoup) implementation(libs.eclipse.jgit) 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 8874bc58a4..95eaf59692 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,10 +1,11 @@ package org.jetbrains.dokka.it.gradle import org.gradle.testkit.runner.TaskOutcome -import org.jetbrains.dokka.test.assumeAndroidSdkInstalled +import org.junit.* import org.junit.runners.Parameterized.Parameters import java.io.File import kotlin.test.* +import kotlin.test.Test class Android0GradleIntegrationTest(override val versions: BuildVersions) : AbstractGradleIntegrationTest() { @@ -12,6 +13,20 @@ class Android0GradleIntegrationTest(override val versions: BuildVersions) : Abst @get:JvmStatic @get:Parameters(name = "{0}") val versions = TestedVersions.ANDROID + + /** + * Indicating whether or not the current machine executing the test is a CI + */ + private val isCI: Boolean get() = System.getenv("CI") == "true" + + private val isAndroidSdkInstalled: Boolean = System.getenv("ANDROID_SDK_ROOT") != null || + System.getenv("ANDROID_HOME") != null + + fun assumeAndroidSdkInstalled() { + if (isCI) return + Assume.assumeTrue(isAndroidSdkInstalled) + } + } @BeforeTest diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt index 312ff21fee..9c549ae2cf 100644 --- a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt +++ b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt @@ -34,7 +34,7 @@ fun AbstractIntegrationTest.applyGitDiffFromFile(diffFile: File) { private fun removeGitFile(repository: Path) = repository.toFile() .listFiles().orEmpty() - .filter { it.name.toLowerCase() == ".git" } + .filter { it.name.lowercase() == ".git" } .forEach { it.delete() } diff --git a/plugins/all-modules-page/build.gradle.kts b/plugins/all-modules-page/build.gradle.kts index 1f64893240..d0778dc521 100644 --- a/plugins/all-modules-page/build.gradle.kts +++ b/plugins/all-modules-page/build.gradle.kts @@ -32,7 +32,6 @@ dependencies { implementation(libs.kotlinx.html) implementation(libs.jsoup) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/plugins/android-documentation/build.gradle.kts b/plugins/android-documentation/build.gradle.kts index 9a94a44c97..5ef734b8ad 100644 --- a/plugins/android-documentation/build.gradle.kts +++ b/plugins/android-documentation/build.gradle.kts @@ -13,7 +13,6 @@ dependencies { testImplementation(projects.plugins.base) testImplementation(projects.plugins.base.baseTestUtils) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/plugins/base/base-test-utils/build.gradle.kts b/plugins/base/base-test-utils/build.gradle.kts index 924a96c8ad..2645fbc3c2 100644 --- a/plugins/base/base-test-utils/build.gradle.kts +++ b/plugins/base/base-test-utils/build.gradle.kts @@ -17,7 +17,6 @@ dependencies { implementation(libs.jsoup) implementation(kotlin("test-junit")) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/plugins/base/build.gradle.kts b/plugins/base/build.gradle.kts index b8e63b1783..98a929aede 100644 --- a/plugins/base/build.gradle.kts +++ b/plugins/base/build.gradle.kts @@ -30,7 +30,6 @@ dependencies { implementation(libs.kotlinx.html) testImplementation(projects.kotlinAnalysis) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/plugins/gfm/build.gradle.kts b/plugins/gfm/build.gradle.kts index 6cdadefbe6..da64c0e9d3 100644 --- a/plugins/gfm/build.gradle.kts +++ b/plugins/gfm/build.gradle.kts @@ -12,7 +12,6 @@ dependencies { testImplementation(projects.plugins.base) testImplementation(projects.plugins.base.baseTestUtils) implementation(libs.jackson.kotlin) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/plugins/gfm/gfm-template-processing/build.gradle.kts b/plugins/gfm/gfm-template-processing/build.gradle.kts index 75634ed28b..021adae2ff 100644 --- a/plugins/gfm/gfm-template-processing/build.gradle.kts +++ b/plugins/gfm/gfm-template-processing/build.gradle.kts @@ -16,7 +16,6 @@ dependencies { implementation(libs.kotlinx.coroutines.core) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/plugins/javadoc/build.gradle.kts b/plugins/javadoc/build.gradle.kts index 97e3a0467f..462e966ff7 100644 --- a/plugins/javadoc/build.gradle.kts +++ b/plugins/javadoc/build.gradle.kts @@ -18,7 +18,6 @@ dependencies { implementation(libs.kotlinx.coroutines.core) testImplementation(projects.plugins.base.baseTestUtils) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(libs.jsoup) diff --git a/test-utils/src/main/kotlin/org/jetbrains/dokka/test/assertIsInstance.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/Asserts.kt similarity index 69% rename from test-utils/src/main/kotlin/org/jetbrains/dokka/test/assertIsInstance.kt rename to plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/Asserts.kt index d646d3852f..9f48b1db0f 100644 --- a/test-utils/src/main/kotlin/org/jetbrains/dokka/test/assertIsInstance.kt +++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/Asserts.kt @@ -1,8 +1,8 @@ -package org.jetbrains.dokka.test +package org.jetbrains.dokka.javadoc -import kotlin.contracts.ExperimentalContracts -import kotlin.contracts.contract +import kotlin.contracts.* +// TODO replace with assertIs from kotlin-test as part of #2924 @OptIn(ExperimentalContracts::class) inline fun assertIsInstance(obj: Any?): T { contract { 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 f62c1886df..6bfd068a35 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,7 +4,6 @@ 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 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 0f8d7e798d..65fbd30f3d 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,6 @@ 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.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 f6b8439f96..b647cd6e37 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 @@ -3,7 +3,6 @@ package org.jetbrains.dokka.javadoc import org.jetbrains.dokka.javadoc.pages.JavadocModulePageNode import org.jetbrains.dokka.javadoc.pages.RowJavadocListEntry import org.jetbrains.dokka.links.DRI -import org.jetbrains.dokka.test.assertIsInstance import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import java.io.File 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 4a761ca6ac..a02b01fa90 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 @@ -4,7 +4,6 @@ import org.jetbrains.dokka.javadoc.pages.JavadocContentKind import org.jetbrains.dokka.javadoc.pages.JavadocPackagePageNode import org.jetbrains.dokka.javadoc.pages.RowJavadocListEntry import org.jetbrains.dokka.links.DRI -import org.jetbrains.dokka.test.assertIsInstance import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import java.io.File diff --git a/plugins/jekyll/build.gradle.kts b/plugins/jekyll/build.gradle.kts index 489b5e00c2..ab99e220be 100644 --- a/plugins/jekyll/build.gradle.kts +++ b/plugins/jekyll/build.gradle.kts @@ -11,7 +11,6 @@ dependencies { implementation(projects.plugins.base) implementation(projects.plugins.gfm) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/plugins/jekyll/jekyll-template-processing/build.gradle.kts b/plugins/jekyll/jekyll-template-processing/build.gradle.kts index 354c4ee78c..936c77bde3 100644 --- a/plugins/jekyll/jekyll-template-processing/build.gradle.kts +++ b/plugins/jekyll/jekyll-template-processing/build.gradle.kts @@ -18,7 +18,6 @@ dependencies { implementation(libs.kotlinx.coroutines.core) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/plugins/kotlin-as-java/build.gradle.kts b/plugins/kotlin-as-java/build.gradle.kts index cfebcfaada..471578db66 100644 --- a/plugins/kotlin-as-java/build.gradle.kts +++ b/plugins/kotlin-as-java/build.gradle.kts @@ -16,7 +16,6 @@ dependencies { testImplementation(libs.jsoup) testImplementation(projects.kotlinAnalysis) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/plugins/mathjax/build.gradle.kts b/plugins/mathjax/build.gradle.kts index d4e5979a6f..8b155862f3 100644 --- a/plugins/mathjax/build.gradle.kts +++ b/plugins/mathjax/build.gradle.kts @@ -16,7 +16,6 @@ dependencies { testImplementation(kotlin("test-junit")) testImplementation(projects.kotlinAnalysis) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/plugins/templating/build.gradle.kts b/plugins/templating/build.gradle.kts index e4ed093e2c..1111bfad2f 100644 --- a/plugins/templating/build.gradle.kts +++ b/plugins/templating/build.gradle.kts @@ -28,7 +28,6 @@ dependencies { implementation(libs.jsoup) testImplementation(projects.plugins.base.baseTestUtils) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/plugins/versioning/build.gradle.kts b/plugins/versioning/build.gradle.kts index d236342903..2cb4070812 100644 --- a/plugins/versioning/build.gradle.kts +++ b/plugins/versioning/build.gradle.kts @@ -28,7 +28,6 @@ dependencies { implementation(libs.jsoup) implementation(libs.apache.mavenArtifact) - testImplementation(projects.testUtils) testImplementation(projects.core.testApi) testImplementation(platform(libs.junit.bom)) testImplementation(libs.junit.jupiter) diff --git a/runners/gradle-plugin/build.gradle.kts b/runners/gradle-plugin/build.gradle.kts index 51645992f5..afb3c02cf8 100644 --- a/runners/gradle-plugin/build.gradle.kts +++ b/runners/gradle-plugin/build.gradle.kts @@ -13,7 +13,6 @@ dependencies { compileOnly(libs.gradlePlugin.kotlin) compileOnly(libs.gradlePlugin.android) - testImplementation(projects.testUtils) testImplementation(libs.gradlePlugin.kotlin) testImplementation(libs.gradlePlugin.android) } diff --git a/settings.gradle.kts b/settings.gradle.kts index e3f493e3db..42fc9fdda5 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -88,8 +88,6 @@ include( ":integration-tests:cli", ":integration-tests:maven", - ":test-utils", - ":mkdocs", ) diff --git a/test-utils/build.gradle.kts b/test-utils/build.gradle.kts deleted file mode 100644 index 6bd501b7aa..0000000000 --- a/test-utils/build.gradle.kts +++ /dev/null @@ -1,7 +0,0 @@ -plugins { - id("org.jetbrains.conventions.kotlin-jvm") -} - -dependencies { - api(kotlin("test-junit")) -} 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 deleted file mode 100644 index 0c0e6d31ae..0000000000 --- a/test-utils/src/main/kotlin/org/jetbrains/dokka/test/assumeAndroidSdkInstalled.kt +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index e9b7be95d0..0000000000 --- a/test-utils/src/main/kotlin/org/jetbrains/dokka/test/environmentUtils.kt +++ /dev/null @@ -1,9 +0,0 @@ -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