aboutsummaryrefslogtreecommitdiff
path: root/build-logic/src/main/kotlin/dokkabuild.test-k2.gradle.kts
blob: d1467dab16c111c854e069f1d285f690bedbdb90 (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
40
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)
}