aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/test/kotlin
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2023-05-17 21:07:19 +0300
committerGitHub <noreply@github.com>2023-05-17 21:07:19 +0300
commita9b3ee192ac09e2e1569a828a9da05d502fb2c75 (patch)
treedde2db404c95dd06176ce6cfebf5db131bd05538 /runners/gradle-plugin/src/test/kotlin
parent3fc8b83aa53a83e8e2915b22ff79acd6e6bb8d28 (diff)
downloaddokka-a9b3ee192ac09e2e1569a828a9da05d502fb2c75.tar.gz
dokka-a9b3ee192ac09e2e1569a828a9da05d502fb2c75.tar.bz2
dokka-a9b3ee192ac09e2e1569a828a9da05d502fb2c75.zip
Update KGP to 1.8.20 (#2989)
* Update KGP to 1.8.20 * Update AGP to be compatible with KGP * Replace `AndroidSourceSet` * Dump API * Update integration tests * Update GH actions tests * Refactor Gradle Runner * Fix `TYPE_MISMATCH_WARNING_FOR_INCORRECT_CAPTURE_APPROXIMATION` * Suppress source sets without compilations Dokka suppresses source sets that do no have compilation since such configuration is invalid, it reports a warning or an error * Introduce `dependsOn` for a new `com.android.build.api.dsl.AndroidSourceSet` * API dump * Add comment * Suppress remaining `TYPE_MISMATCH_WARNING_FOR_INCORRECT_CAPTURE_APPROXIMATION` * Add comment --------- Co-authored-by: Ignat Beresnev <ignat.beresnev@jetbrains.com>
Diffstat (limited to 'runners/gradle-plugin/src/test/kotlin')
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt9
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/IsMainSourceSetTest.kt15
2 files changed, 5 insertions, 19 deletions
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt
index 116104e8..7bd6986e 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt
@@ -33,7 +33,7 @@ class AndroidAutoConfigurationTest {
assertEquals(
listOf(
"androidTest", "androidTestDebug", "debug", "main",
- "release", "test", "testDebug", "testRelease"
+ "release", "test", "testDebug", "testRelease", "androidTestRelease"
).sorted(),
sourceSets.map { it.name }.sorted(),
"Expected all default source sets being registered"
@@ -67,15 +67,16 @@ class AndroidAutoConfigurationTest {
project as ProjectInternal
project.evaluate()
- dokkaTasks.flatMap { it.dokkaSourceSets }.forEach { sourceSet ->
+ dokkaTasks.flatMap { it.dokkaSourceSets }
+ .filterNot { it.name == "androidTestRelease" && it.suppress.get() } // androidTestRelease has empty classpath, but it makes no sense for suppressed source set
+ .forEach { sourceSet ->
/*
There is no better way of checking for empty classpath at the moment (without resolving dependencies).
We assume, that an empty classpath can be resolved
We assume, that a non-empty classpath will not be able to resolve (no repositories defined)
*/
-
- assertFailsWith<ResolveException> { sourceSet.classpath.files }
+ assertFailsWith<ResolveException>("SourceSet: " + sourceSet.name) { sourceSet.classpath.files }
}
}
}
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/IsMainSourceSetTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/IsMainSourceSetTest.kt
deleted file mode 100644
index c354c62f..00000000
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/IsMainSourceSetTest.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.jetbrains.dokka.gradle
-
-import org.jetbrains.dokka.gradle.kotlin.isMainSourceSet
-import kotlin.test.Test
-import kotlin.test.assertTrue
-
-class IsMainSourceSetTest {
- @Test
- fun `missing compilations will return true`() {
- assertTrue(
- isMainSourceSet(emptyList()),
- "Expected 'isMainSourceSet' to return 'true' when no compilations are found"
- )
- }
-}