aboutsummaryrefslogtreecommitdiff
path: root/build-logic/src/main/kotlin/dokkabuild.test-k2.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'build-logic/src/main/kotlin/dokkabuild.test-k2.gradle.kts')
-rw-r--r--build-logic/src/main/kotlin/dokkabuild.test-k2.gradle.kts41
1 files changed, 41 insertions, 0 deletions
diff --git a/build-logic/src/main/kotlin/dokkabuild.test-k2.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.test-k2.gradle.kts
new file mode 100644
index 00000000..d1467dab
--- /dev/null
+++ b/build-logic/src/main/kotlin/dokkabuild.test-k2.gradle.kts
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
+ */
+
+/**
+ * Utility to run unit tests for K1 and K2 (analysis API).
+ */
+
+plugins {
+ id("dokkabuild.base")
+ id("dokkabuild.java")
+}
+
+val descriptorsTestConfiguration: Configuration by configurations.creating {
+ extendsFrom(configurations.testImplementation.get())
+}
+val symbolsTestConfiguration: Configuration by configurations.creating {
+ extendsFrom(configurations.testImplementation.get())
+}
+
+val symbolsTest = tasks.register<Test>("symbolsTest") {
+ useJUnitPlatform {
+ excludeTags("onlyDescriptors", "onlyDescriptorsMPP")
+ }
+ classpath += symbolsTestConfiguration
+}
+// run symbols and descriptors tests
+tasks.test {
+ //enabled = false
+ classpath += descriptorsTestConfiguration
+ dependsOn(symbolsTest)
+}
+
+val descriptorsTest = tasks.register<Test>("descriptorsTest") {
+ classpath += descriptorsTestConfiguration
+}
+
+tasks.check {
+ dependsOn(symbolsTest)
+}
+