aboutsummaryrefslogtreecommitdiff
path: root/build-logic/src/main/kotlin/org/jetbrains/conventions/base-unit-test.gradle.kts
blob: 3ece2e8d61f6f7eb381690c408316b5a2440a3f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package org.jetbrains.conventions

/**
 * Utility to run ynit tests for K1 and K2 (analysis API).
 */

plugins {
    id("org.jetbrains.conventions.base")
    id("org.jetbrains.conventions.base-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", "javaCode", "usingJDK")
    }
    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)
}